CVE-2025-5120

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-5120
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-5120.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-5120
Aliases
Published
2025-07-27T08:15:25Z
Modified
2025-07-29T14:50:00.807853Z
Summary
[none]
Details

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.

References

Affected packages

Git / github.com/huggingface/smolagents

Affected ranges

Type
GIT
Repo
https://github.com/huggingface/smolagents
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

v0.*

v0.1.0

v1.*

v1.0.0