# CVE-2025-5120: Sandbox Escape Vulnerability in huggingface/smolagents

- Severity: High 7.6 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 29.6%, higher than 98% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-07-27T07:57:07.134Z
- Modified: 2026-07-01T20:23:05.176Z
- Also known as: GHSA-6v92-r5mx-h5fx, PYSEC-2026-542
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: @huntr_ai

## 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.

(As written by CVE List.)

## Affected

- huggingface huggingface/smolagents: from unspecified before 1.17.0
- smolagents (PyPI): before 1.17.0
- huggingface smolagents: 1.14.0

## Every score

- @huntr_ai: CVSS: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: CVSS:3.1 9.9 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:L`
- NVD: CVSS:3.1 10.0 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 9.9 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:L`

## References

- <https://huntr.com/bounties/63ab1cfe-b573-4cf5-a7d3-fb6c957e34b0> (exploit, third-party-advisory, web)
- <https://github.com/huggingface/smolagents/commit/33a942e62b6fbf6a35d41f1c735bda2d64c163d0> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-5120> (advisory)
- <https://github.com/huggingface/smolagents> (package)
- <https://pypi.org/project/smolagents> (package)
- <https://github.com/advisories/GHSA-6v92-r5mx-h5fx> (advisory)

## Sources

- CVE List: [CVE-2025-5120](https://www.cve.org/CVERecord?id=CVE-2025-5120), CVE Terms of Use, modified 2025-07-28
- GitHub Advisory Database: [GHSA-6v92-r5mx-h5fx](https://github.com/advisories/GHSA-6v92-r5mx-h5fx), CC-BY-4.0, modified 2026-06-29
- NVD: [CVE-2025-5120](https://nvd.nist.gov/vuln/detail/CVE-2025-5120), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-542](https://osv.dev/vulnerability/PYSEC-2026-542), CC-BY-4.0, modified 2026-07-01

---

Page: https://cve.day/CVE-2025-5120 · Whole record: https://cve.day/CVE-2025-5120.json · Rebuilt by cve.day 2026-11-25T22:59:01.772Z
