Mend.io Vulnerability Database
The largest open source vulnerability database
What is a Vulnerability ID?
New vulnerability? Tell us about it!
CVE-2025-24359
January 24, 2025
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.
Affected Packages
lmfit (CONDA):
Affected version(s) =0.9.3 <0.9.4
Fix Suggestion:
Update to version 0.9.4
asteval (CONDA):
Affected version(s) >=0.9.8 <=0.9.29
Fix Suggestion:
Update to version no_fix
asteval (PYTHON):
Affected version(s) >=0.9.1 <1.0.6
Fix Suggestion:
Update to version 1.0.6
Do you need more information?
Contact Us
CVSS v4
Base Score:
8.6
Attack Vector
LOCAL
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
NONE
Vulnerable System Confidentiality
HIGH
Vulnerable System Integrity
HIGH
Vulnerable System Availability
HIGH
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
8.4
Attack Vector
LOCAL
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Weakness Type (CWE)
Use of Externally-Controlled Format String
Exposed Dangerous Method or Function
EPSS
Base Score:
0.03