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

Published Oct 13, 2026
·
Updated

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 fromaddress memory access. safegetattr blocks the ctypes module but not reachable ctypes type objects, while attribute assignments use unfiltered setattr instead of safesetattr. An attacker-controlled expression can derive an address with id, read memory through fromaddress, 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.

Affected Software

1 affected component
pypi/asteval<1.0.9

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade asteval to a version that resolves this vulnerability.

    Fixed in 1.0.9

Event History

Oct 13, 2026
CVE Published
via MITRE·03:29 PM
Data Sourced
via MITRE·03:29 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed?

Deployments using the default asteval Interpreter with numpy enabled are exposed if they run a version prior to 1.0.9 and evaluate attacker-controlled expressions. The vulnerable behavior is reachable through ctypes type objects exposed despite blocking the ctypes module itself.

2

What does an attacker need to exploit this issue?

An attacker needs the ability to supply an expression for evaluation by the affected Interpreter. No prior privileges are required, but user interaction is required according to the supplied severity vector.

3

What can exploitation do to the host process?

An attacker-controlled expression can derive an address using id, use from_address to read memory, and use attribute assignment to write memory. This can disclose secrets, corrupt process memory, execute code, or crash the host process.

4

What is the remediation?

Upgrade asteval to version 1.0.9, which fixes this issue. The provided data does not specify an alternative mitigation for environments that cannot immediately upgrade.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203