Description
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 host process. This issue is fixed in version 1.0.9.
Published: 2026-10-13
Score: 5.5 Medium
EPSS: n/a
KEV: No
Impact: Arbitrary native memory read/write leading to sandbox escape
Action: Patch Now
AI Analysis

Impact

The vulnerability allows an attacker who can supply an expression to the default asteval Interpreter with numpy enabled to access a ctypes type exposed by the library. By using the ctypes.from_address function and an unfiltered attribute assignment, the attacker can obtain an arbitrary memory address via id and then read or write that memory location. This memory read or write can corrupt process memory, execute arbitrary code, disclose secrets, or crash the host process, effectively escaping the intended sandboxed environment.

Affected Systems

The flaw affects the lmfit:asteval product, specifically any installation of asteval older than version 1.0.9. The issue is present in the default Interpreter implementation before the 1.0.9 release.

Risk and Exploitability

The CVSS score of 5.5 classifies the vulnerability as moderate. EPSS data is not available, and the issue is not listed in the CISA KEV catalog, suggesting that widespread automated exploitation is currently not expected. The likely attack vector is an expression supplied by an untrusted source to the asteval Interpreter; once such an expression is evaluated, the attacker can perform the memory operations described. The mitigation is straightforward through an official patch, but an unpatched system remains susceptible to privilege escalation or data compromise within the process.

Generated by OpenCVE AI on October 13, 2026 at 16:58 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade asteval to version 1.0.9 or later
  • Configure the Interpreter to disable numpy support if it is not required
  • Avoid evaluating expressions from untrusted sources and enforce strict input validation

Generated by OpenCVE AI on October 13, 2026 at 16:58 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 13 Oct 2026 17:00:00 +0000

Type Values Removed Values Added
First Time appeared Lmfit
Lmfit asteval
Vendors & Products Lmfit
Lmfit asteval

Tue, 13 Oct 2026 15:45:00 +0000

Type Values Removed Values Added
Description 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 host process. This issue is fixed in version 1.0.9.
Title asteval sandbox escape: arbitrary native memory read/write via numpy ctypes in default asteval Interpreter
Weaknesses CWE-693
CWE-749
CWE-913
References
Metrics cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-13T15:29:49.209Z

Reserved: 2026-09-29T16:19:11.295Z

Link: CVE-2026-102734

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-13T16:17:09.820

Modified: 2026-10-13T16:17:09.820

Link: CVE-2026-102734

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-13T17:00:17Z

Weaknesses
  • CWE-693

    Protection Mechanism Failure

  • CWE-749

    Exposed Dangerous Method or Function

  • CWE-913

    Improper Control of Dynamically-Managed Code Resources