Skip to main content

Hugging Face Transformers CVE-2025-14920

HIGH
Deserialization of Untrusted Data (CWE-502)
2025-12-23 zdi-disclosures@trendmicro.com
7.8
CVSS 3.0 · Vendor: trendmicro
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Host malicious Perceiver model file
  2. Delivery
    Lure victim to load model
  3. Exploit
    Trigger unsafe deserialization in parser
  4. Execution
    Execute arbitrary code as current user
  5. Impact
    Compromise 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

pypi transformers no fix

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

Vendor (trendmicro) PRIMARY 7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 7.8 HIGH

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).

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Red Hat 8.8 HIGH

Primary rating from Vendor (trendmicro).

CVSS VectorVendor: trendmicro

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

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
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 10 pypi packages depend on transformers (8 direct, 2 indirect)

Ecosystem-wide dependent count for version 4.54.1.

Executive ViewAI

Why It Matters

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.

Business Impact: High
Compensating 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

EPSS Score
0.4%
Top 72% exploitable
Prevalence
High
extremely popular ML/AI library, pervasive across data-science and MLOps environments
Data Quality
3 sources
Confidence: Low

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

39
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +39
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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

cpe:2.3:a:huggingface:transformers:4.54.1:*:*:*:*:*:*:*
CVE-2024-3568 CRITICAL POC
9.6 Apr 10

The huggingface/transformers library is vulnerable to arbitrary code execution through deserialization of untrusted data

CVE-2023-6730 HIGH POC
8.8 Dec 19

Deserialization of Untrusted Data in GitHub repository huggingface/transformers prior to 4.36. Rated high severity (CVSS

CVE-2023-7018 HIGH POC
7.8 Dec 20

Deserialization of Untrusted Data in GitHub repository huggingface/transformers prior to 4.36. Rated high severity (CVSS

CVE-2025-3262 HIGH POC
7.5 Jul 07

A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the huggingface/transformers repository,

CVE-2025-6921 HIGH POC
7.5 Sep 23

The huggingface/transformers library, versions prior to 4.53.0, is vulnerable to Regular Expression Denial of Service (R

CVE-2025-1194 MEDIUM POC
6.5 Apr 29

A Regular Expression Denial of Service (ReDoS) vulnerability was identified in the huggingface/transformers library, spe

CVE-2026-5241 CRITICAL
9.6 Jun 03

Remote code execution in Hugging Face Transformers 5.2.0 allows a malicious model repository to bypass the user's explic

CVE-2025-3264 MEDIUM POC
5.3 Jul 07

A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, sp

CVE-2025-3263 MEDIUM POC
5.3 Jul 07

A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, sp

CVE-2025-6051 MEDIUM POC
5.3 Sep 14

A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, sp

CVE-2025-3933 MEDIUM POC
5.3 Jul 11

A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, sp

CVE-2024-11394 HIGH POC
8.8 Nov 22

Hugging Face Transformers Trax Model Deserialization of Untrusted Data Remote Code Execution Vulnerability. Rated high s

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy