Improper Control of Dynamically-Managed Code Resources Affecting asteval package, versions [,1.0.9)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-ASTEVAL-19233314
  • published23 Aug 2026
  • disclosed20 Aug 2026
  • creditthegr1ffyn

Introduced: 20 Aug 2026

New CVE NOT AVAILABLE CWE-693  (opens in a new tab)
CWE-749  (opens in a new tab)
CWE-913  (opens in a new tab)

How to fix?

Upgrade asteval to version 1.0.9 or higher.

Overview

asteval is a Safe, minimalistic evaluator of python expression using ast module

Affected versions of this package are vulnerable to Improper Control of Dynamically-Managed Code Resources through the Interpreter process when evaluating attacker-controlled expressions with numpy enabled. An attacker can read and write arbitrary process memory by leveraging accessible ctypes type metaclass methods via numpy's ndarray.ctypes wrapper, bypassing attribute filters and exploiting unfiltered attribute assignment. This can lead to disclosure of sensitive data, memory corruption, arbitrary code execution, or process crash. This is only exploitable if untrusted input is evaluated with numpy installed and enabled, and import is disabled by default.

Workaround

This vulnerability can be mitigated by constructing the interpreter with use_numpy set to False.

CVSS Base Scores

version 4.0
version 3.1