Skip to content
CriticalVulnerability

CVE-2025-5120: huggingface/smolagents sandbox escape allowing remote code execution

Identifier
CVE-2025-5120
Published
Record updated
View JSON
Affected
  • smolagents < 1.17.0
Fixed in
1.17.0
  • released May 27, 2025, 61 days before disclosure
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
31.2%

Summary

A sandbox escape in huggingface/smolagents version 1.14.0 lets attackers bypass the restricted execution environment and achieve remote code execution (RCE). The flaw stems from local_python_executor.py, which inadequately restricts Python code execution despite static and dynamic checks. Attackers can exploit whitelisted modules and functions to run arbitrary code and compromise the host system.

Mitigation

The issue is resolved in version 1.17.0.