CVE-2025-5120
JSON

7.6high

Sandbox Escape Vulnerability in huggingface/smolagents

Severity
7.6high CVSS:3.0 by @huntr_ai
Exploit likelihood
29.6% (higher than 98% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
@huntr_ai
Also known as
GHSA-6v92-r5mx-h5fxPYSEC-2026-542

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

Product or packageVersionsReported by
huggingface huggingface/smolagentsfrom unspecified before 1.17.0CVE List
smolagents (PyPI)before 1.17.0GitHub Advisory Database, PyPA Advisory Database
huggingface smolagents1.14.0NVD

All scores

@huntr_ai7.6high CVSS:3.0CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L
GitHub9.9critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:L
NVD10.0critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
PyPA Advisory Database9.9critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:L

Classification

CWE-94

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

Se identificó una vulnerabilidad de escape del entorno de pruebas en la versión 1.14.0 de huggingface/smolagents, que permite a los atacantes eludir el entorno de ejecución restringido y lograr la ejecución remota de código (RCE). La vulnerabilidad se origina en el módulo local_python_executor.py, que restringe inadecuadamente la ejecución de código Python a pesar de emplear comprobaciones estáticas y dinámicas. Los atacantes pueden explotar módulos y funciones incluidos en la lista blanca para ejecutar código arbitrario, comprometiendo así el sistema host. Esta falla socava la seguridad básica diseñada para aislar el código no confiable, lo que plantea riesgos como la ejecución no autorizada de código, la fuga de datos y la posible vulneración de la integración. El problema se ha resuelto en la versión 1.17.0.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-5120 changed 2025-07-28CVE Terms of Use
GitHub Advisory DatabaseGHSA-6v92-r5mx-h5fx changed 2026-06-29CC-BY-4.0
NVDCVE-2025-5120 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2026-542 changed 2026-07-01CC-BY-4.0