CVE-2025-5120: Sandbox Escape Vulnerability in huggingface/smolagents
Vulnerability summary
CVE-2025-5120 is a critical (CVSS 10.0) Improper Control of Generation of Code vulnerability in huggingface huggingface/smolagents. EPSS estimates a 31.24% chance of exploitation in the next 30 days, higher than 98.2% of scored vulnerabilities. 1 public exploit is recorded.
Public exploit (reference, Date unknown)
Source freshness unavailable
How is this decided?Timeline
- 27-07-2025PublishedVulnerability first disclosed.
- 28-07-2025Last modifiedVulnerability information updated.
Description
A sandbox escape vulnerability was identified in huggingface/smolagents version 1.14.0, allowing attackers to bypass the restricted execution environment and achieve remote code execution (RCE). The vulnerability stems from the local_python_executor.py module, which inadequately restricts Python code execution despite employing static and dynamic checks. Attackers can exploit whitelisted modules and functions to execute arbitrary code, compromising the host system. This flaw undermines the core security boundary intended to isolate untrusted code, posing risks such as unauthorized code execution, data leakage, and potential integration-level compromise. The issue is resolved in version 1.17.0.
CVSS metrics
4 scores · 3 sources · 2 versions- OSV · PypiEcosystem advisory · calculated9.9CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:LDiffers
- NVDNIST7.6HighCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L
EPSS trend
Probability
31.24%
Chance of exploitation in the next 30 days
Percentile
98%
Versus all other CVEs
30-day change
Increase +6.66 pp
From 24.57% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
1 foundExploit Reference (huntr.com)
Maturity: unknown
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Huggingface2 products
- huggingface/smolagents≥ unspecified, < 1.17.0
- smolagents1.14.0
PyPI1 product
- smolagents< 1.17.0
2 vendors · 3 products
References
6 links- pypi.org/project/smolagentsPACKAGE