10

CVE-2025-5120: Sandbox Escape Vulnerability in huggingface/smolagents

Analyzed
AliasesGHSA-6v92-r5mx-h5fxPYSEC-2026-542
Published 27-07-2025Last modified 28-07-2025

Vulnerability summary

CVE-2025-5120 is a critical (CVSS 10.0) Improper Control of Generation of Code vulnerability in huggingface huggingface/smolagents. EPSS estimates a 31.24% chance of exploitation in the next 30 days, higher than 98.2% of scored vulnerabilities. 1 public exploit is recorded.

Priority
Prioritisepublic exploit

Public exploit (reference, Date unknown)

Source freshness unavailable

How is this decided?
CVSS score
10.0/10
010
Critical · v3.1 (NVD)
EPSS score
31.24%
0%100%
High · +6.66 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits1reference

Timeline

  1. 27-07-2025
    PublishedVulnerability first disclosed.
  2. 28-07-2025
    Last modifiedVulnerability information updated.

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.

CVSS metrics

4 scores · 3 sources · 2 versions

EPSS trend

Probability

31.24%

Chance of exploitation in the next 30 days

Percentile

98%

Versus all other CVEs

30-day change

Increase +6.66 pp

From 24.57% on 04-10-2026

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

1 found
  • referenceUnverified

    Exploit Reference (huntr.com)

    Maturity: unknown

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.

Huggingface2 products
PyPI1 product
  • smolagents< 1.17.0

2 vendors · 3 products

References

6 links