CVE-2025-24359 | ASTEVAL Vulnerable to Maliciously Crafted Format Strings Leading to Sandbox Escape

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.

Published: 2025-01-24 Last update: 2026-04-15 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2025-24359 is rated Low Risk (36.7/100): CVSS High severity, with low exploitation likelihood (EPSS 0.03%). Mandatory action: Monitor for updates and reassess as exploit intelligence or EPSS changes.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2025-24359

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-03-04 0.05% 0.03% -0.02%
2 2025-10-20 0.04% 0.05% +0.01%
3 2025-01-25 0.04%

Full EPSS history (3 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2025-24359

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
8.4 3.1 HIGH
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
2.5 5.9 [email protected]

Weakness enumeration for CVE-2025-24359

GitHub Security Advisory for CVE-2025-24359

GHSA-3wwr-3g9f-9gc7 · Severity: high · Ecosystem: pip — ASTEVAL Allows Maliciously Crafted Format Strings to Lead to Sandbox Escape

OS Trackers for CVE-2025-24359

vendor priority summary link
debian not yet assigned CVE-2025-24359 not yet assigned priority: Debian including 1 source packages (python-asteval), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 3, open 2. https://security-tracker.debian.org/tracker/CVE-2025-24359
ubuntu medium CVE-2025-24359 medium priority: Ubuntu including 1 source packages (python-asteval), 7 status rows across 7 suites (focal, jammy, noble, oracular, plucky, questing, upstream): needs-triage 3, not-affected 2, ignored 1, released 1. https://ubuntu.com/security/CVE-2025-24359

Affected software / configurations for CVE-2025-24359

Vendor Product Version Raw CPE
No affected products in dataset.

References for CVE-2025-24359

cvelogic Threat Intelligence