CVE-2025-14931: Hugging Face smolagents Remote Code Execution Vulnerability
CRITICALCVE-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.
CVE-2025-14931 at a Glance
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).
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.
pip install smolagents>=Latest secure release
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
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?
Which Hugging Face smolagents versions are affected?
What version fixes CVE-2025-14931?
Is smolagents affected?
What is the CVSS score of CVE-2025-14931?
What CWE is associated with CVE-2025-14931?
How can I check PyPI dependencies for CVE-2025-14931?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}