SmolagentsApplication · Huggingface

CVE-2025-5120

CRITICAL · 10.0 CVSS v3.1 Published 2025-07-27
Patch available
A vendor patch is available. No clean upgrade release — apply the published patch.
See remediation →
100/100
Remediation priority · Urgent
Public exploit Remotely reachable No privileges Zero-click Patch available

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

A sandbox escape vulnerability in huggingface/smolagents version 1.14.0 allows attackers to bypass the restricted execution environment in local_python_executor.py and achieve remote code execution. The module uses static and dynamic checks but inadequately restricts whitelisted modules and functions, enabling arbitrary code execution and compromising the host system.

MitigationUpgrade to version 1.17.0 which resolves the vulnerability by implementing proper restrictions on the whitelisted modules and functions in the local_python_executor.py module.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
SmolagentsApplication
Affected:= 1.14.0

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify installed smolagents version
    Run pip show smolagents or pip list | grep smolagents to check the installed version number
    Affected if The installed version is exactly 1.14.0
  2. Locate local_python_executor module
    Find the local_python_executor.py file in the smolagents installation directory, typically in the agent namespace
    Affected if The local_python_executor.py file exists in the smolagents package and is being used by your agent configuration
  3. Verify sandbox configuration
    Inspect the code that configures the local_python_executor, looking for any whitelist definitions of modules or functions that could be exploited
    Affected if The executor has permissive module/function whitelists that could allow import or execution of dangerous modules like os, sys, or subprocess
  4. Check for code execution logs
    Review application logs for any unexpected code execution patterns through the python executor, particularly attempts to access restricted modules
    Affected if There are logs showing execution of code that bypasses the intended sandbox restrictions

You are affected if smolagents version 1.14.0 is installed and the local_python_executor module is in use, as the sandbox can be escaped to achieve arbitrary code execution.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Patch available Apply the vendor patch
Vendor patch github.com →
Interim mitigation

Upgrade to version 1.17.0 which resolves the vulnerability by implementing proper restrictions on the whitelisted modules and functions in the local_python_executor.py module.

Recommended fix High confidence

smolagents >= 1.17.0

  1. Upgrade smolagents from version 1.14.0 to version 1.17.0 or later using pip: pip install --upgrade smolagents
  2. Verify the upgrade was successful by checking the installed version: pip show smolagents
  3. Ensure any dependent projects or environments using smolagents are restarted to load the new version
Caveat Review the smolagents 1.17.0 release notes for any breaking changes in behavior or API, though none were noted in the vulnerability description

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Smolagents Scoped from the published advisory
  • Consultation6.0 h
  • Implementation12.0 h
  • Testing6.0 h
  • Review / QA4.0 h
28.0 hours of engineering $4,980
Get the patch applied

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $7,968.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2025-5120 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2025-5120 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data