Executive brief
SimpleEval is a Python library used to safely evaluate mathematical and logical expressions within applications. A security flaw allows attackers to bypass the library's safety sandbox by accessing restricted system modules through specifically crafted inputs. This could allow an attacker to execute unauthorized code or gain full control over the application environment.
Technical details
A sandbox escape vulnerability exists in SimpleEval due to improper restriction of object attributes. When objects or modules are passed as names to the evaluator, an attacker can traverse attribute chains (e.g., via os.path or statistics.sys) to reach dangerous modules like 'os' or 'sys'. Additionally, dangerous functions can be accessed by passing them as callbacks to otherwise safe functions. This allows for arbitrary code execution (CWE-94) and improper control of dynamically-determined object attributes (CWE-915). The vulnerability is fixed in version 1.0.5, which introduces a ModuleWrapper to sanitize passed items.
Affected products
- danthedeckie simpleeval < 1.0.5
- Red Hat Red Hat OpenShift AI 2.25
- Debian simpleeval 0.9.10-1+deb11u1
Timeline
- 2026-03-13: disclosed: Initial discovery and GitHub advisory publication
- 2026-03-16: advisory: NVD publication of CVE-2026-32640
- 2026-03-13: patched: Version 1.0.5 released with fixes
- 2026-04-21: patched: Debian LTS security update released
- 2026-04-23: patched: Red Hat OpenShift AI update released
References
- https://github.com/danthedeckie/simpleeval/security/advisories/GHSA-44vg-5wv2-h2hg
- https://lists.debian.org/debian-lts-announce/2026/04/msg00023.html
- https://access.redhat.com/errata/RHSA-2026:10184
- https://access.redhat.com/security/cve/CVE-2026-32640
- https://bugzilla.redhat.com/show_bug.cgi?id=2447529
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-32640.json