CVE-2025-5120Huggingface Smolagents
Critical 10.0 No auth needed
Follow: this CVE · Huggingface · Huggingface Smolagents We alert you by email or Slack (account required).
- Priority
- 75
- CVSS 3.1
- 10.0
- EPSS
- —
- Auth required
- No
- Published
- Jul 27, 2025
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-94
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
What happens
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.
What to do
- Apply the vendor's security update for Smolagents.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | smolagents |
< 1.17.0 |
1.17.0 |
pip install "smolagents>=1.17.0" |
| PyPI | smolagents |
< 1.17.0 |
1.17.0 |
pip install "smolagents>=1.17.0" |
Per OSV / GitHub Advisories (GHSA-6v92-r5mx-h5fx, PYSEC-2026-542). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| huggingface | smolagents | 1.14.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- huntr.com Exploit Third Party Advisory