CVE-2026-55244
## Summary An attacker who can supply expressions to `asteval.Interpreter.eval()` can raise `SystemExit`, `KeyboardInterrupt`, `GeneratorExit`, or `BaseException` from inside the sandbox. These exceptions are subclasses of `BaseException` but not `Exception`, so they bypass the `except Exception:` safety net in both `run()` and `eval()`. The exception propagates verbatim to the calling application, terminating the process or disrupting signal and cleanup handlers. This is distinct from prior vulnerabilities CVE-2025-24359 (format string injection) and GHSA-vp47-9734-prjw (AST mutation TOCTOU), both fixed in 1.0.6. This vector is present in all versions including 1.0.6 and current HEAD. --- ## Affected Code **`asteval/astutils.py`, lines 89–108** — `FROM_PY` exposes dangerous classes to sandbox users: ```python FROM_PY = ('ArithmeticError', 'AssertionError', 'AttributeError', 'BaseException', # ← escapes except Exception: 'BufferError', 'BytesWarning', ... 'GeneratorExit', # ← escapes except Exception: ... 'KeyboardInterrupt', # ← escapes except Exception: ... 'SystemExit', # ← escapes except Exception: ...) ``` **`asteval/asteval.py`, line 322** — `run()` exception handler: ```python except Exception: # ← does NOT catch BaseException subclasses if with_raise and self.expr is not None: self.raise_exception(node, expr=self.expr) ``` **`asteval/asteval.py`, line 370** — `eval()` exception handler: ```python except Exception: # ← same gap if show_errors and not raise_errors: ... ``` **`asteval/asteval.py`, line 264** — `raise_exception()` raises the class directly: ```python raise exc(self.error_msg) # ← when exc=SystemExit, escapes both handlers above ``` --- ## Root Cause Python's exception hierarchy has two distinct branches under `BaseException`:
Properties
- ghsa_id
- GHSA-89v8-rhwq-hf77
- severity
- medium
- summary
- asteval has a Sandbox Escape via BaseException Subclasses
- cvss_score
- 5
- cve_id
- CVE-2026-55244
- cvss_vector
- CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H
- is_ghsa_only
- false
- ghsa_published
- 2026-08-20T17:28:52Z
- source_url
- https://github.com/advisories/GHSA-89v8-rhwq-hf77
- ghsa_updated
- 2026-08-20T17:28:53Z
Related Entities (4)
HAS_WEAKNESS (1)
REPORTED_BY (1)
VULNERABLE_TO (1)
AFFECTS (1)
Explore deeper with Ninja Signal's threat intelligence graph