Security Digest · Vulnerability record
CVE-2025-5120: smolagents has Sandbox Escape Vulnerability in the local_python_executor.py Module
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).
CVSS 9.9 Critical EPSS 26.3% · p98
Should you act?
High exploit likelihood
EPSS ranks it in the top 5% of all CVEs for likely exploitation in the next 30 days. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.
- Not in CISA KEV, but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
- EPSS 26.3%, percentile 98: FIRST’s model estimates a 26.3% chance of exploitation activity in the next 30 days, higher than 98% of all scored CVEs (very high). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes
smolagents(PyPI) < 1.17.0, fixed in 1.17.0. Check your lockfile, including transitive dependencies.
What it is
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 localpythonexecutor.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.
From the GitHub advisory
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 localpythonexecutor.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.
Weakness type: CWE-94.
Product: smolagents (PyPI) · Assigned by: @huntr_ai · Published: 2025-07-27
Affected and fixed versions
| Ecosystem | Package | Vulnerable | First fixed |
|---|---|---|---|
| PyPI | smolagents | < 1.17.0 | 1.17.0 |
| Vendor | Product | Affected versions (per CVE record) |
|---|---|---|
| huggingface | huggingface/smolagents | unspecified < 1.17.0 |
Severity scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| @huntr_ai | 3.0 | 7.6 High | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L |
| GitHub | 3.1 | 9.9 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:L |
- Attack vector: network (remotely reachable)
- Attack complexity: low
- Privileges required: none (no login)
- User interaction: none
- Scope: changed (can affect other components)
CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.
Exploitation and urgency
- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation poc, automatable no, technical impact partial.
- FIRST EPSS (model of 2026-10-21): 26.30% probability of exploitation activity in the next 30 days; percentile 98.
Timeline
- — CVE record published by @huntr_ai
- — GitHub-reviewed advisory GHSA-6v92-r5mx-h5fx published (critical)
- — CVE record last updated
Sources and references
Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.
Vulnerability records
- GitHub Advisory GHSA-6v92-r5mx-h5fx github.com
- CVE.org record CVE-2025-5120 cve.org
- NVD entry CVE-2025-5120 nvd.nist.gov
Other references from the CVE record and advisory
- huntr.com huntr.com
- github.com github.com