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

EcosystemPackageVulnerableFirst fixed
PyPIsmolagents< 1.17.01.17.0
VendorProductAffected versions (per CVE record)
huggingfacehuggingface/smolagentsunspecified < 1.17.0

Severity scores

Scored byCVSSScoreVector
@huntr_ai3.07.6 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L
GitHub3.19.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

  1. GitHub Advisory GHSA-6v92-r5mx-h5fx github.com
  2. CVE.org record CVE-2025-5120 cve.org
  3. NVD entry CVE-2025-5120 nvd.nist.gov

Other references from the CVE record and advisory

  1. huntr.com huntr.com
  2. github.com github.com

Critical PyPI advisories · Today’s Security Digest