Skip to main content
VulnerabilityPublished Updated

CVE-2025-24359: Python asteval · ASTEVAL is an evaluator of Python expressions and statements

Affects python-astevalSource GCVE Database

0
Compare

Not known to be exploited · CVSS 8.4 High.

Data as of 24 Nov 2026, 21:15 UTC

CVSS 3.1 base score
8.4High
How severe the flaw is on the 0–10 CVSS scale.
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:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 24 Jan 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
Ubuntu 24.04 LTSpython-astevalpkg:deb/ubuntu/python-asteval?arch=source&distro=nobleOther threatsAffected
  • =0.9.30-1
  • =0.9.31-1
Fixed in–
Ubuntu 22.04 LTSpython-astevalpkg:deb/ubuntu/python-asteval?arch=source&distro=jammyOther threatsAffected
  • =0.9.19-2
  • =0.9.25-2
Fixed in–
Ubuntu 20.04 LTSpython-astevalpkg:deb/ubuntu/python-asteval?arch=source&distro=focalOther threatsAffected
  • =0.9.12-1
  • =0.9.12-2
  • =0.9.17-1
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

Community reviews

Loading reviews…