cve.bz

CVE-2025-24359 lmfit asteval: Exposed Dangerous Method or Function

8.4 highEPSS 0.3%Fix available

High (8.4) in lmfit asteval. EPSS 0.3% estimated probability of exploitation activity in the next 30 days. Fixed in asteval 1.0.6.

On this page
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.

Severity

CVSS 3.1

8.4 high
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
0.3% (unchanged from 0.3% a week ago; 0.3% 30 days ago) estimated probability of exploitation activity in the next 30 days; 21st percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: total, assessed 2025-01-24. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-134 Use of Externally-Controlled Format String
CWE-749 Exposed Dangerous Method or Function
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-24359 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-24359?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-24359?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-24359 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
lmfit asteval< 1.0.6

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-3wwr-3g9f-9gc7PyPIasteval<1.0.61.0.6
PYSEC-2026-1195PyPIasteval<1.0.61.0.6

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12python-astevalno fix listedDEBIAN-CVE-2025-24359
Debian13, 14python-asteval1.0.6-2DEBIAN-CVE-2025-24359
Ubuntu20.04:LTS, 22.04:LTS, 24.04:LTSpython-astevalno fix listedUBUNTU-CVE-2025-24359
SUSEPackage Hub 15 SP6python-asteval1.0.6-bp156.4.3.1openSUSE-SU-2025:0052-1
openSUSELeap 15.6python-asteval1.0.6-bp156.4.3.1openSUSE-SU-2025:0052-1
openSUSETumbleweedpython-asteval1.0.6-1.1openSUSE-SU-2025:14701-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE.

Attack patterns (CAPEC)

  • CAPEC-500 WebView Injection
  • CAPEC-67 String Format Overflow in syslog() Likelihood: High · Severity: Very High
  • CAPEC-135 Format String Injection Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON