CVE-2026-32640: SimpleEval Objects (including Modules) Can Leak Vulnerability

HIGH
Advisory Identifier: GHSA-44vg-5wv2-h2hg
CVSS 9.8
CWE-94 CWE-915
Published
Advisory Summary

CVE-2026-32640 is a HIGH (CVSS 9.8) objects (including modules) can leak vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting SimpleEval libraries in the PyPI ecosystem. The issue involves objects (including modules) can leak dangerous modules through to direct access inside the sandbox. Remediation is available by upgrading affected packages to version 1.0.5.

CVE-2026-32640 at a Glance

CVE Identifier CVE-2026-32640
GHSA Identifier GHSA-44vg-5wv2-h2hg
Severity HIGH
CVSS v3.1 Base Score 9.8
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product SimpleEval
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-32640

To remediate this vulnerability, upgrade all affected SimpleEval dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

simpleeval fixed: 1.0.5
pip install simpleeval>=1.0.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show simpleeval

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-32640, inspect your installed packages using pip:

pip show simpleeval

Analyze the terminal output to locate any version of SimpleEval in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.5), your application is affected.

Note: The pip show simpleeval command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In SimpleEval, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact If the objects passed in as `names` to SimpleEval have modules or other disallowed / dangerous objects available as attrs. Additionally, dangerous functions or modules could be accessed by passing them as callbacks to other safe functions to call. Examples (found by @ByamB4): Any module where non-underscore attribute chains reach os or sys: - os.path, pathlib, shutil, glob (direct .os / .sys attributes) - statistics (has .sys) - numpy (has .ctypeslib.os and .f2py.sys) - urllib.parse (has .warnings.sys) ### Patches The latest version 1.0.5 has this issue fixed. ### Workarounds Don't pass in objects or modules which have direct attributes to potentially dangerous items. Use a wrapper to wrap the potentially vulnerable items (See the ModuleWrapper in version 1.0.5)

CVE-2026-32640 Affected SimpleEval Versions

1 component(s)
Fixed Versions:
1.0.5
Product / Package Ecosystem Affected Versions Fixed Version
simpleeval
PyPI
< 1.0.5
1.0.5

References

Frequently Asked Questions

What is CVE-2026-32640?
CVE-2026-32640 is a security vulnerability in SimpleEval involving Objects (including modules) can leak dangerous modules through to direct access inside the sandbox under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which SimpleEval versions are affected?
Affected versions include releases prior to 1.0.5 across affected packages: simpleeval.
What version fixes CVE-2026-32640?
Upgrading to 1.0.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is simpleeval affected?
Yes, simpleeval is affected in releases prior to 1.0.5. Upgrade your dependency to 1.0.5 or later.
What is the CVSS score of CVE-2026-32640?
CVE-2026-32640 has a CVSS v3.1 base score of 9.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-32640?
CVE-2026-32640 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check PyPI dependencies for CVE-2026-32640?
Run the dependency tree command: 'pip show simpleeval'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-44vg-5wv2-h2hg",
  "modified" : "2026-06-08T19:47:08Z",
  "published" : "2026-03-13T20:56:26Z",
  "aliases" : [ "CVE-2026-32640" ],
  "summary" : "SimpleEval: Objects (including modules) can leak dangerous modules through to direct access inside the sandbox",
  "details" : "### Impact\nIf the objects passed in as `names` to SimpleEval have modules or other disallowed / dangerous objects available as attrs.\nAdditionally, dangerous functions or modules could be accessed by passing them as callbacks to other safe functions to call.\n\nExamples (found by @ByamB4):\n\nAny module where non-underscore attribute chains reach os or sys:\n- os.path, pathlib, shutil, glob (direct .os / .sys attributes)\n- statistics (has .sys)\n- numpy (has .ctypeslib.os and .f2py.sys)\n- urllib.parse (has .warnings.sys)\n\n### Patches\nThe latest version 1.0.5 has this issue fixed.\n\n### Workarounds\nDon't pass in objects or modules which have direct attributes to potentially dangerous items.\nUse a wrapper to wrap the potentially vulnerable items (See the ModuleWrapper in version 1.0.5)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "simpleeval"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/danthedeckie/simpleeval/security/advisories/GHSA-44vg-5wv2-h2hg"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-32640"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/danthedeckie/simpleeval"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/danthedeckie/simpleeval/releases/tag/1.0.5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/simpleeval/PYSEC-2026-132.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2026/04/msg00023.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-915", "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-13T20:56:26Z",
    "nvd_published_at" : "2026-03-16T14:19:40Z"
  }
}