Hugging Face Transformers CVE-2025-14920
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessHost malicious Perceiver model file
-
DeliveryLure victim to load model
-
ExploitTrigger unsafe deserialization in parser
-
ExecutionExecute arbitrary code as current user
-
ImpactCompromise ML host/credentials
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V1 - Encoding and Sanitization Safe deserialization, type allowlists
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the victim to load/open an attacker-controlled model file parsed by the Transformers Perceiver model code path; the serialized model data is deserialized without proper validation of user-supplied input (CWE-502). Limiting factors per the CVSS vector: it is NOT remotely triggerable over the network (AV:L) and REQUIRES user interaction (UI:R) - the target must be induced to visit a malicious page or open/load a malicious model file. No authentication or special privileges are needed on the attacker side (PR:N), and code runs only in the context of the current user (S:U), so impact is bounded by that user's privileges rather than automatic privilege escalation. |
| Impact | This is a CWE-502 deserialization-to-RCE flaw in Hugging Face Transformers (ZDI-25-1150 / ZDI-CAN-25423). The provided CVSS:3.0 vector (AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H, 7.8) and the ZDI description are internally consistent: although the title and prose say 'remote attackers,' the vector is correctly AV:L with UI:R - exploitation is not network-reachable but requires the victim to load/open a malicious model file locally, so 'remote' here means attacker-supplied content, not a listening-service attack. Real-world urgency is moderate rather than acute: EPSS is low at 0.36% (28th percentile), the CVE is NOT on CISA KEV, and no public exploit is referenced - the only source is the ZDI advisory. So despite a High (7.8) CVSS and full C/I/A impact, the dominant signal set (low EPSS, no KEV, no POC, mandatory user interaction, local vector) points to a credible-but-not-widespread threat driven by social-engineering delivery of untrusted models rather than automatable mass exploitation. Note the description/title say 'remote' while the CVSS vector says AV:L - this is the standard ZDI file-parsing pattern and is not a true conflict, but defenders should treat the true attack surface as 'untrusted model file loading,' not an exposed network port. |
| Exploit ScenarioDerived | An attacker publishes a weaponized model repository (or sends a malicious model file / link) that embeds a malicious serialized object; a data scientist or CI pipeline loads the model with a vulnerable Transformers version, triggering deserialization of untrusted data during parsing of the Perceiver model files and executing arbitrary code as the current user. Because the CVSS vector is AV:L/AC:L with UI:R, exploitation is low-complexity but hinges entirely on the victim being induced to open or load the malicious model. No public exploit code is identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 19, 2026
Deserialization of untrusted data in Hugging Face Transformers' Perceiver model file parsing path allows code execution in the context of the user who loads a malicious model, tracked as ZDI-CAN-25423 / ZDI-25-1150. Per the assessed CVSS vector (AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H), the flaw is not network-triggerable and requires user interaction - a victim must be induced to open or load an attacker-controlled model file - and any code that runs is bounded by that user's privileges rather than elevating them. The CPE for this advisory enumerates Transformers 4.54.1, EPSS is low at 0.36% (28th percentile), and no public exploit code was identified at time of analysis; the vendor advisory is available at https://www.zerodayinitiative.com/advisories/ZDI-25-1150/.
RemediationAI
No vendor-released patch identified at time of analysis, so remediation centers on eliminating exposure to attacker-controlled model files: treat only model artifacts from trusted, verified sources as safe, and prefer non-executable weight formats such as safetensors over pickle-based .bin checkpoints, since safetensors does not perform arbitrary object deserialization (trade-off: not all legacy or third-party checkpoints publish safetensors variants, requiring conversion or re-export). Verify integrity of downloaded models via publisher-provided hashes or signatures before loading them, and pin Transformers to an explicitly reviewed version rather than pulling arbitrary model revisions. Where untrusted or community models must be evaluated, load them inside a sandboxed, low-privilege container or VM with no access to credentials, SSH keys, cloud tokens, or sensitive mounts, accepting the operational overhead of the sandbox as the compensating cost. Restrict automated pipelines and CI jobs from fetching arbitrary remote model repositories, and monitor the ZDI advisory at https://www.zerodayinitiative.com/advisories/ZDI-25-1150/ (and the upstream Hugging Face project) for a fixed release, applying it as soon as one is published.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-502, deserialization of untrusted data: the Perceiver model loading code path parses serialized model files and reconstructs Python objects from data supplied by whoever produced the file, without adequate validation of that input. In the Hugging Face ecosystem, legacy model weights are commonly distributed in pickle-based container formats, and unpickling attacker-controlled content is a well-known path to arbitrary code execution because the deserialization process can invoke object constructors and reduce/globals resolution. Because the trigger is loading a local artifact, the CVSS vector scores this as AV:L with UI:R - the attacker cannot reach the flaw directly over the network and must first persuade the victim to fetch and open a crafted model (for example from a model hub repository, a downloaded archive, or a link on a malicious page); PR:N means no credentials are needed on the attacker side, and S:U plus C:H/I:H/A:H means full confidentiality, integrity, and availability loss but only within the victim user's security context. The CPE cpe:2.3:a:huggingface:transformers:4.54.1 identifies the version enumerated in the advisory, and the 'Deserialization' and 'RCE' tags align with the ZDI disclosure of ZDI-CAN-25423.
Know when Transformers gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Attack delivers a malicious file loaded locally (AV:L) with required victim interaction (UI:R); deserialization yields code execution as the current user, giving full C/I/A within that scope (S:U).
Primary rating from Vendor (trendmicro).
CVSS VectorVendor: trendmicro
DescriptionCVE.org
Hugging Face Transformers Perceiver Model Deserialization of Untrusted Data Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Hugging Face Transformers. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file.
The specific flaw exists within the parsing of model files. 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 current user. Was ZDI-CAN-25423.
Blast Radius
ecosystem impact- 10 pypi packages depend on transformers (8 direct, 2 indirect)
Ecosystem-wide dependent count for version 4.54.1.
Executive ViewAI
Hugging Face Transformers 4.54.1 contains a high-severity deserialization vulnerability in its Perceiver model loading path that can allow code execution under the privileges of the user who opens a malicious model file. The exposure is concentrated in machine-learning engineering and data-science teams that routinely download and load third-party model artifacts, making model provenance and execution isolation a leadership-level supply-chain concern. No public exploit identified at time of analysis and no vendor-released patch identified at time of analysis, but the required user interaction and high-severity code execution risk justify immediate model-handling controls.
No vendor-released patch identified at time of analysis. Interim mitigations include blocking load of untrusted Perceiver model files, enforcing model allowlisting and provenance or checksum verification, running Transformers model loading in isolated low-privilege sandboxes or containers, restricting use of Transformers 4.54.1, and monitoring endpoint activity for malicious model files.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Insecure deserialization occurs when an application converts serialized data (a stream of bytes representing an object's state) back into a living object without proper validation.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Affected Products (CPE)CVE.org
More in Transformers
View allThe huggingface/transformers library is vulnerable to arbitrary code execution through deserialization of untrusted data
Deserialization of Untrusted Data in GitHub repository huggingface/transformers prior to 4.36. Rated high severity (CVSS
Deserialization of Untrusted Data in GitHub repository huggingface/transformers prior to 4.36. Rated high severity (CVSS
A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the huggingface/transformers repository,
The huggingface/transformers library, versions prior to 4.53.0, is vulnerable to Regular Expression Denial of Service (R
A Regular Expression Denial of Service (ReDoS) vulnerability was identified in the huggingface/transformers library, spe
Remote code execution in Hugging Face Transformers 5.2.0 allows a malicious model repository to bypass the user's explic
A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, sp
A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, sp
A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, sp
A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, sp
Hugging Face Transformers Trax Model Deserialization of Untrusted Data Remote Code Execution Vulnerability. Rated high s
NVD
CVE.org
EPSS
GitHub PoC
Exploit-DB