CVE-2025-24359: Python asteval · ASTEVAL is an evaluator of Python expressions and statements
Affects python-astevalSource GCVE Database
Not known to be exploited · CVSS 8.4 High.
Data as of 24 Nov 2026, 21:15 UTC
- EPSS
- 0.2% chance of exploitation in 30 days – higher than 20% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 24 Jan 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 24 Nov 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu 24.04 LTSpython-astevalpkg:deb/ubuntu/python-asteval?arch=source&distro=nobleOther threats | Affected
| Fixed in– |
Ubuntu 22.04 LTSpython-astevalpkg:deb/ubuntu/python-asteval?arch=source&distro=jammyOther threats | Affected
| Fixed in– |
Ubuntu 20.04 LTSpython-astevalpkg:deb/ubuntu/python-asteval?arch=source&distro=focalOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
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.
References
- ubuntu.com/security/CVE-2025-24359 (opens in a new tab)
- cve.org/CVERecord?id=CVE-2025-24359 (opens in a new tab)
- github.com/lmfit/asteval/security/advisories/GHSA-3wwr-3g9f-9gc7 (opens in a new tab)
- github.com/lmfit/asteval/blob/cfb57f0beebe0dc0520a1fbabc35e66060c7ea71/asteval/asteval.py (opens in a new tab)
- lucumr.pocoo.org/2016/12/29/careful-with-str-format (opens in a new tab)