PT-2025-30998 · Hugging Face · Smolagents

Albertvillanova

·

Published

2025-07-27

·

Updated

2025-08-07

·

CVE-2025-5120

CVSS v3.1

10

Critical

VectorAV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions huggingface/smolagents versions prior to 1.17.0
Description A sandbox escape allows attackers to bypass the restricted execution environment and achieve remote code execution (RCE). The issue resides in 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, potentially compromising the host system. This flaw undermines the security boundary intended to isolate untrusted code, posing risks such as unauthorized code execution and data leakage.
Recommendations Update to version 1.17.0 or later.

Exploit

Fix

RCE

Code Injection

Weakness Enumeration

Related Identifiers

CVE-2025-5120
GHSA-6V92-R5MX-H5FX

Affected Products

Smolagents