Skip to main content

Hugging Face Transformers CVE-2025-14928

HIGH
Code Injection (CWE-94)
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
    Craft malicious HuBERT checkpoint
  2. Delivery
    Deliver via model hub or direct share
  3. Exploit
    Victim runs convert_config conversion
  4. Execution
    Unvalidated string injected into Python exec
  5. Impact
    Arbitrary code runs as current user

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
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 and run the convert_config conversion path on an attacker-supplied HuBERT checkpoint in Hugging Face Transformers 4.57.0; the malicious checkpoint carries a crafted string that convert_config fails to validate before executing as Python code. Limiting factors: this is a local attack (AV:L) demanding active user interaction (UI:R) - the user must deliberately convert the hostile checkpoint - so there is no remote, unauthenticated, network-triggered path and no mass-exploitation vector. Code runs only in the context of the current user (S:U), bounded by that user's privileges, and the attacker must first get the malicious checkpoint in front of a victim who performs the conversion.

Impact

This is a genuine but conditional risk rather than a drop-everything emergency. The provided CVSS 3.0 vector (AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H, base 7.8) is internally consistent with the description: despite the title calling it 'Remote Code Execution', the vector correctly scores it as a LOCAL attack vector (AV:L) requiring user interaction (UI:R) - the victim must actively load/convert an attacker-supplied malicious HuBERT checkpoint. The 'remote' framing refers to the attacker delivering a malicious artifact (e.g. via a public model hub), not to network-reachable exploitation; defenders should treat this as a supply-chain/malicious-file issue, not an internet-facing service flaw. Supporting signals are modest: EPSS is low at 0.34% (26th percentile), there is NO CISA KEV listing, and no public exploit code is referenced - only the ZDI advisory. The low EPSS is consistent with the UI:R requirement, which caps mass-automated exploitation. No SSVC decision data was supplied. Net: a high-impact (full C/I/A compromise of the user context) but attacker-dependent-on-social-engineering issue affecting a hugely popular ML library - prioritize patching for any workflow that ingests third-party checkpoints, but it does not carry the automatable, network-wormable profile of top-tier emergencies.

Exploit ScenarioDerived

An attacker publishes a trojanized HuBERT model checkpoint to a public model hub or sends it directly to a victim. When the victim loads and runs the conversion routine, the convert_config function passes an attacker-controlled string into Python execution without validation, running arbitrary code with the victim's privileges. No public proof-of-concept is referenced beyond the ZDI advisory, and the local vector plus required user interaction mean exploitation hinges on tricking the user into converting the malicious checkpoint.

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

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

Alert me

AnalysisAIv1 – Oct 19, 2026

Code injection in Hugging Face Transformers 4.57.0 lets an attacker who supplies a crafted HuBERT checkpoint execute arbitrary Python in the victim's user context when that checkpoint is run through the convert_config conversion path. Exploitation is local and requires user interaction - the victim must deliberately convert the malicious file - so there is no remote, unauthenticated network-triggered path and no mass-exploitation vector; EPSS is 0.34% (26th percentile) and no public exploit code has been identified at time of analysis. Impact is bounded by the privileges of the converting user, but a successful trigger yields full confidentiality, integrity and availability loss within that context.

RemediationAI

No vendor-released patch with an exact fix version is confirmed in the provided data - remediation guidance is limited to the ZDI advisory ZDI-25-1146 (https://www.zerodayinitiative.com/advisories/ZDI-25-1146/), so track that advisory and apply the vendor patched Transformers release as soon as it is published rather than assuming any specific version is fixed. Until then, the effective control is to not run convert_config on untrusted HuBERT checkpoints: only convert checkpoints whose provenance and hashes are verified, and perform any third-party conversion inside a disposable container or VM with no mounted credentials, no access to the Hugging Face token store, and egress-restricted networking - accepting the trade-off that GPU passthrough and legitimate upload steps may need temporary exceptions. Restricting conversion to a dedicated low-privilege account limits blast radius of the C:H/I:H/A:H impact, at the cost of extra operational setup, and avoid trust_remote_code/remote-code loading of untrusted Hub models, which sacrifices convenience for models that genuinely require custom code.

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 flaw is a CWE-94 improper control of code generation issue in the HuBERT checkpoint conversion utility of Hugging Face Transformers 4.57.0 (CPE cpe:2.3:a:huggingface:transformers:4.57.0). The convert_config function assembles a configuration from values embedded in an incoming checkpoint, but fails to validate a user-supplied string before it is used to execute Python code - a classic eval-style sink where attacker-controlled checkpoint metadata becomes executable Python rather than inert data. Because model checkpoints are distributed as opaque archives of config and weight files, a hostile checkpoint is trivially shareable (model hub, email, shared storage), and the code runs only when the victim invokes the conversion routine, inheriting the Python process's privileges and access to credentials, tokens and mounted data. The CVSS 3.1 vector AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H reflects a local, low-complexity attack requiring victim interaction with unchanged scope.

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

Local because exploitation requires processing a malicious checkpoint file (AV:L) with user-initiated conversion (UI:R); no prior auth needed (PR:N); arbitrary code yields full C/I/A in the user context.

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:A/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 HuBERT convert_config Code Injection 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 convert a malicious checkpoint.

The specific flaw exists within the convert_config function. The issue results from the lack of proper validation of a user-supplied string before using it to execute Python code. An attacker can leverage this vulnerability to execute code in the context of the current user. Was ZDI-CAN-28253.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 7 pypi packages depend on transformers (7 direct, 0 indirect)

Ecosystem-wide dependent count for version 4.57.0.

Executive ViewAI

Why It Matters

Hugging Face Transformers 4.57.0, a widely used library in machine-learning and data-science workflows, contains a code injection flaw in its HuBERT checkpoint conversion path that lets a malicious model file run arbitrary Python code under the account of whoever converts it. Impact is confined to the converting user's privileges, but that user loses full confidentiality, integrity and availability of their session and whatever data and credentials it can reach - typically an engineer workstation or an ML pipeline node. Leadership should care because third-party model checkpoints are frequently pulled from public hubs with little scrutiny, and engineering teams adopting AI tooling are the affected population.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: perform all checkpoint conversion inside a sandboxed, low-privilege container or disposable VM with no production credentials or network egress; accept only model artifacts from approved sources with verified hashes; restrict the HuBERT convert_config path to trusted staff and trusted files; monitor conversion hosts for unexpected process or script execution.

Threat Intelligence Overview

EPSS Score
0.3%
Top 74% exploitable
Prevalence
High
Hugging Face Transformers is a dominant, widely-deployed ML/AI library
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.3%
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

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

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.57.0:*:*:*:*:*:*:*
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