CVE-2025-5120CWE-94

Sandbox Escape Vulnerability in huggingface/smolagents

High · published July 27, 2025

CVSS v3.0
7.6
EPSS
26%
Percentile
98.0
In the wild
Unconfirmed
What it is

⚡ A sneaky sandbox escape in huggingface/smolagents allows attackers to slip right out of restricted execution like a magician pulling a rabbit from a hat! 🐇 Think of this vulnerability like a restaurant kitchen where the chef can sneak into the pantry and grab anything they want, despite being told to only work with their limited ingredients. It permits untrusted code to jump the fence and takes over the entire system, which is a recipe for disaster! An attacker could exploit this flaw to execute arbitrary code on the host system, leading to unauthorized access, data leakage, and even integration-level compromises. This could result in devastating consequences, such as critical data exposure or manipulation – not something you want happening behind the scenes!

Put simply

Think of this vulnerability like a restaurant kitchen where the chef can sneak into the pantry and grab anything they want, despite being told to only work with their limited ingredients. It permits untrusted code to jump the fence and takes over the entire system, which is a recipe for disaster! This vulnerability in the local_python_executor.py module fails to adequately restrict Python code execution, allowing attackers to bypass security checks and exploit whitelisted modules and functions for remote code execution (RCE).

What to do

An attacker could exploit this flaw to execute arbitrary code on the host system, leading to unauthorized access, data leakage, and even integration-level compromises. This could result in devastating consequences, such as critical data exposure or manipulation – not something you want happening behind the scenes! Immediately upgrade huggingface/smolagents to version 1.17.0 to patch this critical vulnerability. Additionally, review your configurations and ensure that execution environments are strictly controlled to mitigate any potential exploits going forward. You've got this! By taking these steps, you'll restore security and keep your systems safe. 🛡️

The record
Technical detail
CVSS v3.0
7.6 · HIGH
Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L
CVSS v4.0
Not supplied
EPSS
0.26303 · 98.0th percentile
Weakness
CWE-94 · Improper Control of Generation of Code ('Code Injection')
Published
2025-07-27T07:57Z
EPSS history
Timeline
  • 27 JUL 07:57Z
    Sandbox Escape Vulnerability in huggingface/smolagents
    cvelistv5