---
title: "CVE-2025-5120: smolagents has Sandbox Escape Vulnerability in the local_python_executor.py Module"
url: https://erroneo.us/security/cve/CVE-2025-5120/
description: "CVE-2025-5120 (smolagents (PyPI)): A sandbox escape vulnerability was identified in huggingface/smolagents version 1.14.0, allowing attackers to bypass the…"
type: vulnerability-record
section: "Security Digest"
date_published: 2025-07-27
date_modified: 2025-08-07
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2025-5120"
kev: false
cvss: 9.9
epss: 0.26303
license: All rights reserved. Quote with attribution and a link.
---

# CVE-2025-5120: smolagents has Sandbox Escape Vulnerability in the local_python_executor.py Module

**Signal:** High exploit likelihood. EPSS ranks it in the top 5% of all CVEs for likely exploitation in the next 30 days. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

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

## Affected packages

- PyPI `smolagents` < 1.17.0 → fixed: 1.17.0

## Affected products (CVE record)

- huggingface huggingface/smolagents: unspecified < 1.17.0

## Severity

- @huntr_ai CVSS 3.0: 7.6 `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 `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:L`

## Exploitation

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

## Sources

- [GitHub Advisory GHSA-6v92-r5mx-h5fx](https://github.com/advisories/GHSA-6v92-r5mx-h5fx)
- [CVE.org record CVE-2025-5120](https://www.cve.org/CVERecord?id=CVE-2025-5120)
- [NVD entry CVE-2025-5120](https://nvd.nist.gov/vuln/detail/CVE-2025-5120)
- [huntr.com](https://huntr.com/bounties/63ab1cfe-b573-4cf5-a7d3-fb6c957e34b0)
- [github.com](https://github.com/huggingface/smolagents/commit/33a942e62b6fbf6a35d41f1c735bda2d64c163d0)

---
Source page: https://erroneo.us/security/cve/CVE-2025-5120/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
