CVE-2025-24359 ASTEVAL Vulnerable to Maliciously Crafted Format Strings Leading to Sandbox Escape
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: no · technical impact: total
- Technology
- UbuntuDebian
Description
ASTEVAL is an evaluator of Python expressions and statements. Prior to version 1.0.6, if an attacker can control the input to the asteval library, they can bypass asteval's restrictions and execute arbitrary Python code in the context of the application using the library. The vulnerability is rooted in how asteval performs handling of FormattedValue AST nodes. In particular, the on_formattedvalue value uses the dangerous format method of the str class. The code allows an attacker to manipulate the value of the string used in the dangerous call fmt.format(__fstring__=val). This vulnerability can be exploited to access protected attributes by intentionally triggering an AttributeError exception. The attacker can then catch the exception and use its obj attribute to gain arbitrary access to sensitive or protected object properties. Version 1.0.6 fixes this issue.
Upgrade path
7 packages: 3 fixed, 3 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| debian/python-asteval(Debian 12) | = 0.9.28-1; = 0.9.30-1; = 0.9.31-1; = 1.0.6-1 +2 more | No fix listed | No fix yet |
| ubuntu/python-asteval(Ubuntu 22.04) | All versions | No fix listed | No fix yet |
| ubuntu/python-asteval(Ubuntu 24.04) | All versions | No fix listed | No fix yet |
| debian/python-asteval(Debian 13) | < 1.0.6-2 | 1.0.6-2 | Fixed |
| debian/python-asteval(Debian 14) | < 1.0.6-2 | 1.0.6-2 | Fixed |
| pypi asteval(PyPI) | < 1.0.6; <= 1.0.5; = 0.9; = 0.9.1 +38 more | 1.0.6 | Fixed |
| lmfit asteval | = < 1.0.6 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| pypi asteval(PyPI) | < 1.0.6 | 1.0.6 |
| pypi asteval(PyPI) | = 0.9 | No fix listed |
| pypi asteval(PyPI) | = 0.9.1 | No fix listed |
| pypi asteval(PyPI) | = 0.9.10 | No fix listed |
| pypi asteval(PyPI) | = 0.9.11 | No fix listed |
| pypi asteval(PyPI) | = 0.9.12 | No fix listed |
| pypi asteval(PyPI) | = 0.9.13 | No fix listed |
| pypi asteval(PyPI) | = 0.9.14 | No fix listed |
| pypi asteval(PyPI) | = 0.9.15 | No fix listed |
| pypi asteval(PyPI) | = 0.9.16 | No fix listed |
| pypi asteval(PyPI) | = 0.9.17 | No fix listed |
| pypi asteval(PyPI) | = 0.9.18 | No fix listed |
| pypi asteval(PyPI) | = 0.9.19 | No fix listed |
| pypi asteval(PyPI) | = 0.9.2 | No fix listed |
| pypi asteval(PyPI) | = 0.9.20 | No fix listed |
| pypi asteval(PyPI) | = 0.9.21 | No fix listed |
| pypi asteval(PyPI) | = 0.9.22 | No fix listed |
| pypi asteval(PyPI) | = 0.9.23 | No fix listed |
| pypi asteval(PyPI) | = 0.9.24 | No fix listed |
| pypi asteval(PyPI) | = 0.9.25 | No fix listed |
| pypi asteval(PyPI) | = 0.9.26 | No fix listed |
| pypi asteval(PyPI) | = 0.9.27 | No fix listed |
| pypi asteval(PyPI) | = 0.9.28 | No fix listed |
| pypi asteval(PyPI) | = 0.9.29 | No fix listed |
| pypi asteval(PyPI) | = 0.9.3 | No fix listed |
Show 28 more
| Product | Affected versions | Fixed in |
|---|---|---|
| pypi asteval(PyPI) | = 0.9.30 | No fix listed |
| pypi asteval(PyPI) | = 0.9.31 | No fix listed |
| pypi asteval(PyPI) | = 0.9.32 | No fix listed |
| pypi asteval(PyPI) | = 0.9.33 | No fix listed |
| pypi asteval(PyPI) | = 0.9.4 | No fix listed |
| pypi asteval(PyPI) | = 0.9.5 | No fix listed |
| pypi asteval(PyPI) | = 0.9.6 | No fix listed |
| pypi asteval(PyPI) | = 0.9.7 | No fix listed |
| pypi asteval(PyPI) | = 0.9.8 | No fix listed |
| pypi asteval(PyPI) | = 0.9.9 | No fix listed |
| pypi asteval(PyPI) | = 1.0.0 | No fix listed |
| pypi asteval(PyPI) | = 1.0.1 | No fix listed |
| pypi asteval(PyPI) | = 1.0.2 | No fix listed |
| pypi asteval(PyPI) | = 1.0.3 | No fix listed |
| pypi asteval(PyPI) | = 1.0.4 | No fix listed |
| pypi asteval(PyPI) | = 1.0.5 | No fix listed |
| pypi asteval(PyPI) | <= 1.0.5 | No fix listed |
| debian/python-asteval(Debian:12) | All versions | No fix listed |
| debian/python-asteval(Debian:12) | = 0.9.28-1 | No fix listed |
| debian/python-asteval(Debian:12) | = 0.9.30-1 | No fix listed |
| debian/python-asteval(Debian:12) | = 0.9.31-1 | No fix listed |
| debian/python-asteval(Debian:12) | = 1.0.6-1 | No fix listed |
| debian/python-asteval(Debian:12) | = 1.0.6-2 | No fix listed |
| debian/python-asteval(Debian:13) | < 1.0.6-2 | 1.0.6-2 |
| debian/python-asteval(Debian:14) | < 1.0.6-2 | 1.0.6-2 |
| lmfit asteval | = < 1.0.6 | No fix listed |
| ubuntu/python-asteval(Ubuntu:22.04) | All versions | No fix listed |
| ubuntu/python-asteval(Ubuntu:24.04) | All versions | No fix listed |
References
- https://github.com/lmfit/asteval/security/advisories/GHSA-3wwr-3g9f-9gc7 vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com patch
- github.com product
- https://github.com/lmfit/asteval/blob/cfb57f0beebe0dc0520a1fbabc35e66060c7ea71/asteval/asteval.py#L507
- https://lucumr.pocoo.org/2016/12/29/careful-with-str-format
- pypi.org product
- github.com vendor-advisory
- Debian Security Tracker CVE-2025-24359 vendor-advisory
- Ubuntu CVE tracker vendor-advisory
- www.cve.org
- bugs.debian.org issue-tracking