Vulnerability · Published Jul 27, 2025 · Assigned by @huntr_ai

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

High 7.6

In plain English

A high-severity code injection in huggingface/smolagents from huggingface. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 31.2% (higher than 98% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.0)7.6High
Exploit odds (30 days)31.2%top 1.7% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

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

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
PyPIsmolagents1.17.0GHSA-6v92-r5mx-h5fx
PyPIsmolagents1.17.0PYSEC-2026-542

Affected products (as reported)

VendorProductVersions
huggingface huggingface/smolagents unspecified – before 1.17.0

Weakness: CWE-94 · Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L

References