CVE-2025-5120

Sandbox Escape Vulnerability in huggingface/smolagents

Published Jul 27, 2025 CVSS 3.1 · 10.0 Critical EPSS 31.2% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2025-22815 smolagents has Sandbox Escape Vulnerability in the local_python_executor.py Module
Github GHSA Github GHSA GHSA-6v92-r5mx-h5fx smolagents has Sandbox Escape Vulnerability in the local_python_executor.py Module
History
Type Values Removed Values Added
CPEs cpe:2.3:a:huggingface:smolagents:1.14.0:*:*:*:*:*:*:*
Metrics cvssV3_1

{'score': 10.0, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H'}

Type Values Removed Values Added
First Time appeared Huggingface
Huggingface smolagents
Vendors & Products Huggingface
Huggingface smolagents
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title Sandbox Escape Vulnerability in huggingface/smolagents
Weaknesses CWE-94
References
Metrics cvssV3_0

{'score': 7.6, 'vector': 'CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
@huntr_ai
Published
Updated
Jul 28, 2025, 2:09 PM
Reserved
May 23, 2025, 4:08 PM
Status
Analyzed
Published
Jul 27, 2025, 8:15 AM
Modified
Jun 17, 2026, 9:47 AM