CVE-2025-5120
CVE-2025-5120 is a critical-severity vulnerability in Huggingface Smolagents with a CVSS 3.x base score of 10.0. Its EPSS exploit-prediction score of 20% places it in the 97th percentile, indicating an elevated likelihood of exploitation. The underlying weakness is classified as CWE-94.
Key facts
- Severity: Critical (CVSS 3.x base score 10.0)
- EPSS exploit prediction: 20% (97th percentile)
- Actively exploited: Not listed in CISA KEV
- EU (EUVD) id: EUVD-2025-22815
- Weakness: CWE-94
- Affected product: Huggingface Smolagents
- Published:
- Last modified:
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.
Frequently asked questions
- What is CVE-2025-5120?
- 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.
- How severe is CVE-2025-5120?
- CVE-2025-5120 has a CVSS 3.x base score of 10.0, rated critical severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
- Is CVE-2025-5120 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 20% (97th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2025-5120?
- CVE-2025-5120 affects Huggingface Smolagents. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2025-5120?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its critical severity, prioritise patching exposed systems.
- Does CVE-2025-5120 have an EU (EUVD) identifier?
- Yes. CVE-2025-5120 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2025-22815.
- When was CVE-2025-5120 published?
- CVE-2025-5120 was published on 2025-07-27 and last updated on 2026-06-17.
References
- https://github.com/huggingface/smolagents/commit/33a942e62b6fbf6a35d41f1c735bda2d64c163d0
- https://huntr.com/bounties/63ab1cfe-b573-4cf5-a7d3-fb6c957e34b0
Affected products (1)
- cpe:2.3:a:huggingface:smolagents:1.14.0:*:*:*:*:*:*:*
More vulnerabilities in Huggingface Smolagents
- CVE-2026-4963 — Medium (CVSS 6.3): A weakness has been identified in huggingface smolagents 1.25.0.dev0. This affects the function…
- CVE-2026-2654 — Medium (CVSS 6.3): A weakness has been identified in huggingface smolagents 1.24.0. Impacted is the function requests.get/requests.post of…
- CVE-2025-11844 — Medium (CVSS 5.4): Hugging Face Smolagents version 1.20.0 contains an XPath injection vulnerability in the search_item_ctrl_f function…
All CVEs affecting Huggingface Smolagents →
Other CWE-94 (Code Injection) vulnerabilities
- CVE-2026-76605 — Critical (CVSS 10.0): Joomla Extension - fabrikar.com - Remote code execution via image element in Fabrik < 4.7.3 - ???.
- CVE-2026-76604 — Critical (CVSS 10.0): Joomla Extension - fabrikar.com - Unauthenticated remote code execution via PHP form element in Fabrik < 4.7.3 - The…
- CVE-2026-67364 — Critical (CVSS 10.0): Joomla Extension - balbooa.com - Pre-auth PHP Code Injection in Balbooa Forms < 2.4.3.2 - CWE-94 / CWE-95 | CVSS 3.1:…
- CVE-2026-73343 — Critical (CVSS 10.0): Unauthenticated Remote Code Execution (RCE) in WP Compress < 7.20.01 versions.
- CVE-2026-74253 — Critical (CVSS 10.0): Joomla Extension - regularlabs.com - Unauthenticated RCE through unverified reflected user input in Sourcerer < 14.0.0…
- CVE-2026-73678 — Critical (CVSS 10.0): MindsDB Minds Platform version 26.1.0 and earlier contains an unauthenticated remote code execution vulnerability that…