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 19% 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: 19% (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 19% (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-57624 — Critical (CVSS 10.0): Unauthenticated Remote Code Execution (RCE) in Blocksy Companion Pro <= 2.1.46 versions.
- CVE-2026-10134 — Critical (CVSS 10.0): IBM Langflow OSS 1.0.0 through 1.9.3 allows an attacker to read every secret available to the Langflow process, read…
- CVE-2026-53576 — Critical (CVSS 10.0): Kestra is an open-source, event-driven orchestration platform. Prior to 1.0.45 and 1.3.21, the authentication filter…
- CVE-2026-10561 — Critical (CVSS 10.0): IBM Langflow OSS 1.0.0 through 1.9.3 has an vulnerability due to an improper isolation of Python execution combined…
- CVE-2026-25470 — Critical (CVSS 10.0): Improper Control of Generation of Code ('Code Injection') vulnerability in ACPT ACPT (Pro) - Custom Post Types Plugin…
- CVE-2026-48836 — Critical (CVSS 10.0): Unauthenticated Remote Code Execution (RCE) in Easy Invoice <= 2.1.19 versions.