Read the docs
TI-2025-18102 Aliases CVE-2025-24359GHSA-3wwr-3g9f-9gc7

ASTEVAL Vulnerable to Maliciously Crafted Format Strings Leading to Sandbox Escape

Priority HIGH 72CWE-134Published · Updated

Key facts

Attack vector
Local
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-134 and the CVSS impact.

Summary

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00278 20th percentileScored 2026-11-07
Fix Fixed asteval (lmfit): 1.0.6asteval (PyPI): 1.0.6

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
lmfitastevalbefore 1.0.61.0.6Patch availableCNA
—asteval (PyPI)before 1.0.61.0.6Patch availableGHSA-3wwr-3g9f-9gc7
  • asteval Vendorlmfit Affected before 1.0.6 Fixed in 1.0.6 Patch available CNA
  • asteval (PyPI) Vendor— Affected before 1.0.6 Fixed in 1.0.6 Patch available GHSA-3wwr-3g9f-9gc7

Remediation

  • Fix · CNA asteval (lmfit) Fixed in 1.0.6
  • Fix · GHSA-3wwr-3g9f-9gc7 asteval (PyPI) Fixed in 1.0.6 Advisory →

Vendor assessments

Red Hat

Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat

Timeline

  1. 2026-10-02 Threatist record created from CVE-2025-24359
  2. 2026-10-03 Alias added: GHSA-3wwr-3g9f-9gc7

References

  • TI-2026-39918 ASTEVAL: Sandbox Escape via BaseException Subclasses CVSS 3.1MEDIUM 5.0
  • TI-2026-71827 Sandbox escape in asteval allows arbitrary process memory access CVSS 3.1MEDIUM 5.5

Sources