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 31% places it in the 98th 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: 31% (98th 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 31% (98th 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-71499 — Critical (CVSS 10.0): cf-manager is an all-in-one dashboard for managing multiple Cloudflare accounts and services. Prior to 1.1.2,…
- CVE-2026-78287 — Critical (CVSS 10.0): Improper Control of Generation of Code ('Code Injection') vulnerability in Staggs STAGGS staggs allows Remote Code…
- CVE-2026-115252 — Critical (CVSS 10.0): The Confection WordPress Cable WordPress plugin from 0.4.0 to 0.4.7 does not perform any capability or nonce checks…
- CVE-2026-120338 — Critical (CVSS 10.0): Prefab UI's Generative UI sandbox runs caller-supplied Python inside Pyodide, Python compiled to WebAssembly, in a Deno…
- CVE-2026-61991 — Critical (CVSS 10.0): Unauthenticated Remote Code Execution (RCE) in AjaxLoadMore Cache <= 3.1.1 versions.
- CVE-2026-61564 — Critical (CVSS 10.0): AVideo is a video-sharing Platform. Prior to 8.1.0, the unauthenticated installer endpoint…