Vulnerabilities in pkg:pypi/smolagents

PACKAGE
Advisory Identifier: GHSA-q9r5-6hrr-9ph7
Advisory Summary

CVE-2025-14931 is a CRITICAL (CVSS 10.0) remote code execution vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Hugging Face smolagents libraries in the PyPI ecosystem. The issue involves unsafe deserialization in remote python executor leads to rce. Remediation is available in the latest vendor maintenance releases.

5 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/smolagents

5 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/smolagents. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-q9r5-6hrr-9ph7 CVE-2025-14931 CRITICAL Hugging Face smolagents: Unsafe deserialization in Remote Python Executor leads to RCE
GHSA-jxgv-6j54-wwc7 CVE-2026-2654 LOW Hugging Face Smolagents has a Server-Side Request Forgery issue
GHSA-54fq-v6x8-244g CVE-2026-4963 LOW Hugging Face Smolagents has an Injection issue
GHSA-8mf9-rmgw-33qc CVE-2025-11844 MODERATE Hugging Face Smolagents XPath injection vulnerability in the search_item_ctrl_f function
GHSA-6v92-r5mx-h5fx CVE-2025-5120 CRITICAL smolagents has Sandbox Escape Vulnerability in the local_python_executor.py Module

CVE-2025-14931 at a Glance

CVE Identifier CVE-2025-14931
GHSA Identifier GHSA-q9r5-6hrr-9ph7
Severity CRITICAL
CVSS v3.1 Base Score 10.0
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Hugging Face smolagents
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 10.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2025-14931

To remediate this vulnerability, upgrade all affected Hugging Face smolagents dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

smolagents fixed: Latest secure release
pip install smolagents>=Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show smolagents

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-14931, inspect your installed packages using pip:

pip show smolagents

Analyze the terminal output to locate any version of Hugging Face smolagents in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The pip show smolagents command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Hugging Face smolagents, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Hugging Face smolagents Remote Python Executor Deserialization of Untrusted Data Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Hugging Face smolagents. Authentication is not required to exploit this vulnerability. The specific flaw exists within the parsing of pickle data. The issue results from the lack of proper validation of user-supplied data, which can result in deserialization of untrusted data. An attacker can leverage this vulnerability to execute code in the context of the service account. Was ZDI-CAN-28312.

CVE-2025-14931 Affected Hugging Face smolagents Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
smolagents
PyPI
≤ 1.23.0

References

Frequently Asked Questions

What is CVE-2025-14931?
CVE-2025-14931 is a security vulnerability in Hugging Face smolagents involving Unsafe deserialization in Remote Python Executor leads to RCE under CWE-502: Deserialization of Untrusted Data.
Which Hugging Face smolagents versions are affected?
Affected versions include releases prior to current release patches across affected packages: smolagents.
What version fixes CVE-2025-14931?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is smolagents affected?
Yes, smolagents is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2025-14931?
CVE-2025-14931 has a CVSS v3.1 base score of 10.0 (CRITICAL) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2025-14931?
CVE-2025-14931 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check PyPI dependencies for CVE-2025-14931?
Run the dependency tree command: 'pip show smolagents'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-q9r5-6hrr-9ph7",
  "modified" : "2026-05-07T05:44:44Z",
  "published" : "2025-12-23T21:30:29Z",
  "aliases" : [ "CVE-2025-14931" ],
  "summary" : "Hugging Face smolagents: Unsafe deserialization in Remote Python Executor leads to RCE",
  "details" : "Hugging Face smolagents Remote Python Executor Deserialization of Untrusted Data Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Hugging Face smolagents. Authentication is not required to exploit this vulnerability.\n\nThe specific flaw exists within the parsing of pickle data. The issue results from the lack of proper validation of user-supplied data, which can result in deserialization of untrusted data. An attacker can leverage this vulnerability to execute code in the context of the service account. Was ZDI-CAN-28312.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "smolagents"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.23.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-14931"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/huggingface/smolagents"
  }, {
    "type" : "WEB",
    "url" : "https://www.zerodayinitiative.com/advisories/ZDI-25-1143"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-07T05:44:44Z",
    "nvd_published_at" : "2025-12-23T21:15:48Z"
  }
}