Checkov: ASTEVAL Allows Maliciously Crafted Format Strings to Lead to Sandbox Escape (CVE-2025-24359)
A vulnerability in the asteval library used by Checkov allows attackers controlling input to bypass sandbox restrictions and execute arbitrary Python code. This occurs due to unsafe handling of formatted string AST nodes, enabling crafted format strings to escape the sandbox. The flaw can be exploited to access protected attributes and execute system commands. A proof-of-concept demonstrates executing the 'whoami' command on the host. The vulnerability affects Checkov versions from 3.2.420 up to but not including 3.2.490. A patch is available to remediate this issue.
AI Analysis
Technical Summary
The vulnerability in Checkov (CVE-2025-24359) arises from how the asteval library processes FormattedValue AST nodes. Specifically, the on_formattedvalue method uses Python's str.format in a way that allows an attacker to manipulate format strings to escape the sandbox. By triggering and catching an AttributeError exception, the attacker can access protected object attributes and invoke arbitrary code execution, including running system commands. The provided proof-of-concept code shows how the 'whoami' command can be executed via this flaw. This affects Checkov versions >=3.2.420 and <3.2.490.
Potential Impact
Successful exploitation allows an attacker with control over input to the asteval interpreter to execute arbitrary Python code with the privileges of the application using Checkov. This includes the ability to run system commands, leading to full compromise of the host environment. The CVSS score is 8.4 (high), indicating a severe impact on confidentiality, integrity, and availability.
Mitigation Recommendations
A patch is available for this vulnerability. Users should upgrade Checkov to version 3.2.490 or later to remediate the issue. No additional mitigation steps are required if the patch is applied.
Checkov: ASTEVAL Allows Maliciously Crafted Format Strings to Lead to Sandbox Escape (CVE-2025-24359)
Description
A vulnerability in the asteval library used by Checkov allows attackers controlling input to bypass sandbox restrictions and execute arbitrary Python code. This occurs due to unsafe handling of formatted string AST nodes, enabling crafted format strings to escape the sandbox. The flaw can be exploited to access protected attributes and execute system commands. A proof-of-concept demonstrates executing the 'whoami' command on the host. The vulnerability affects Checkov versions from 3.2.420 up to but not including 3.2.490. A patch is available to remediate this issue.
CVSS v3.1
Score 8.4high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in Checkov (CVE-2025-24359) arises from how the asteval library processes FormattedValue AST nodes. Specifically, the on_formattedvalue method uses Python's str.format in a way that allows an attacker to manipulate format strings to escape the sandbox. By triggering and catching an AttributeError exception, the attacker can access protected object attributes and invoke arbitrary code execution, including running system commands. The provided proof-of-concept code shows how the 'whoami' command can be executed via this flaw. This affects Checkov versions >=3.2.420 and <3.2.490.
Potential Impact
Successful exploitation allows an attacker with control over input to the asteval interpreter to execute arbitrary Python code with the privileges of the application using Checkov. This includes the ability to run system commands, leading to full compromise of the host environment. The CVSS score is 8.4 (high), indicating a severe impact on confidentiality, integrity, and availability.
Mitigation Recommendations
A patch is available for this vulnerability. Users should upgrade Checkov to version 3.2.490 or later to remediate the issue. No additional mitigation steps are required if the patch is applied.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-checkov-CVE-2025-24359
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 3.1
Threat ID: 6aac8e2655bf5e2cf5490b2a
Added to database: 09/18/2026, 01:04:38 UTC
Last enriched: 09/18/2026, 01:39:13 UTC
Last updated: 09/18/2026, 02:23:27 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.