p PatchFirst

PatchFirst · Latest vulnerabilities

asteval vulnerabilities

Vulnerabilities published for asteval in the last 30 days: 1. Listed in the KEV catalogue: 0.

Filter vulnerabilities
Clear filters

Vulnerabilities: 4

  1. CVE-2026-102734

    Medium · CVSS 5.5EPSS 0.13%Fix available

    asteval sandbox escape: arbitrary native memory read/write via numpy ctypes in default asteval Interpreter

    asteval is a Python expression evaluator designed for restricted execution. Prior to 1.0.9, in asteval/astutils.py, the default Interpreter with numpy enabled exposes a ctypes type and permits from_address memory access. safe_getattr blocks the ctypes module but not reachable ctypes type objects, while attribute assignments use unfiltered setattr instead of safe_setattr. An attacker-controlled expression can derive an address with id, read memory through from_address, and write through an attribute assignment. The expression can read or corrupt arbitrary process memory, escape the intended sandbox, execute code, disclose secrets, or crash the

    • Update to 1.0.9
    Published Updated
  2. CVE-2026-55244

    Medium · CVSS 5EPSS 0.18%Fix available

    ASTEVAL: Sandbox Escape via BaseException Subclasses

    ASTEVAL is an evaluator of Python expressions and statements. Prior to 1.0.9, FROM_PY in asteval/astutils.py exposes BaseException, SystemExit, KeyboardInterrupt, and GeneratorExit to expressions evaluated by asteval.Interpreter.eval(), while run() and eval() in asteval/asteval.py catch Exception rather than these non-Exception BaseException subclasses. When an attacker-controlled expression raises one of these classes, on_raise() passes the class to raise_exception(), and the resulting exception bypasses the interpreter's safety handlers and propagates into the calling application. A consuming service that evaluates untrusted expressions can

    • Update to 1.0.9
    Published Updated
  3. CVE-2025-24359

    High · CVSS 8.4EPSS 0.28%Fix available

    ASTEVAL Vulnerable to Maliciously Crafted Format Strings Leading to Sandbox Escape

    ASTEVAL is an evaluator of Python expressions and statements. Prior to version 1.0.6, if an attacker can control the input to the `asteval` library, they can bypass asteval's restrictions and execute arbitrary Python code in the context of the application using the library. The vulnerability is rooted in how `asteval` performs handling of `FormattedValue` AST nodes. In particular, the `on_formattedvalue` value uses the dangerous format method of the str class. The code allows an attacker to manipulate the value of the string used in the dangerous call `fmt.format(__fstring__=val)`. This vulnerability can be exploited to access protected attri

    • Update to 1.0.6
    Published Updated
  4. GHSA-vp47-9734-prjw

    High · CVSS 8.4Fix available

    ASTEVAL Allows Malicious Tampering of Exposed AST Nodes Leads to Sandbox Escape

    ### Summary If an attacker can control the input to the asteval library, they can bypass its safety restrictions and execute arbitrary Python code within the application's context. ### Details The vulnerability is rooted in how `asteval` performs attribute access verification. In particular, the [`on_attribute`](https://github.com/lmfit/asteval/blob/8d7326df8015cf6a57506b1c2c167a1c3763e090/asteval/asteval.py#L565) node handler prevents access to attributes that are either present in the `UNSAFE_ATTRS` list or are formed by names starting and ending with `__`, as shown in the code snippet below: ```py def on_attribute(self, node): # (

    • Update to 1.0.6
    Published Updated

Check your server

Check your installed stack and versions against the current vulnerability feeds.

Check your server →