Skip to main content

Hugging Face Transformers CVE-2025-14927

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
    Publish malicious SEW-D checkpoint
  2. Delivery
    Victim downloads and converts checkpoint
  3. Exploit
    Unvalidated string reaches convert_config
  4. Execution
    Python code injection executes
  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 invoke the convert_config function (the SEW-D checkpoint/config conversion path) on an attacker-controlled checkpoint - i.e. the target must deliberately convert a malicious model checkpoint (UI:R). The attack vector is local (AV:L): the malicious checkpoint must be present and processed on the victim's machine, so there is no network-reachable, unauthenticated entry point. No special privileges are required (PR:N) and attack complexity is low (AC:L), so once a malicious checkpoint is loaded for conversion, execution is reliable. LIMITING FACTORS: the mandatory user/pipeline action of converting an untrusted checkpoint, the local vector, and the fact that code executes only with the privileges of the current user (S:U, no privilege escalation). Environments that only process trusted first-party checkpoints are not realistically exposed.

Impact

This is a moderate-priority, not a top-tier emergency, vulnerability. The CVSS 3.0 score of 7.8 is driven by HIGH impact to confidentiality, integrity, and availability (full arbitrary code execution as the current user), but the vector explicitly states AV:L (local) and UI:R (user interaction required) - the victim must actively convert a malicious checkpoint. These two signals substantially blunt real-world risk: this is not a remotely-reachable, self-propagating flaw despite the title containing 'Remote Code Execution'. EPSS corroborates the lower urgency at 0.34% (26th percentile), indicating low predicted exploitation probability. There is no CISA KEV listing and no public proof-of-concept identified in the provided data, so exploitation is theoretical at this time. CONFLICTING SIGNAL TO NOTE: the description repeatedly says 'remote attackers' while the CVSS vector encodes AV:L (local) - this is characteristic of ZDI 'open-a-malicious-file' categorizations where delivery may be remote (e.g. a downloaded checkpoint) but the exploitation action is local; treat the attack as file-borne rather than network-reachable and verify with the ZDI advisory. Overall this is a 'high-CVSS-but-conditional-real-risk' issue: dangerous in ML/MLOps pipelines that auto-convert untrusted third-party checkpoints, but low mass-exploitation potential.

Exploit ScenarioDerived

An attacker publishes a weaponized SEW-D model checkpoint to a public model hub or sends it directly to a target. When a developer or an automated pipeline uses Transformers' convert_config routine to convert that checkpoint, the unvalidated attacker-supplied string is evaluated as Python, executing arbitrary code in the context of the current user. No public exploit code was identified at time of analysis, so exploitation currently requires the attacker to craft the malicious checkpoint themselves.

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' SEW-D convert_config path allows arbitrary Python execution when a user converts an attacker-supplied model checkpoint, but only with the privileges of the current user. The assessed vector is local (AV:L) with required user interaction (UI:R) - the victim must deliberately invoke the conversion on a malicious checkpoint - and no public exploit code or CISA KEV activity has been identified at time of analysis, with EPSS around 0.34% (26th percentile). Risk is moderate rather than urgent: environments that only convert trusted first-party checkpoints are not realistically exposed.

RemediationAI

No vendor-released fix version is confirmed in the provided data; the only reference is the ZDI advisory (https://www.zerodayinitiative.com/advisories/ZDI-25-1148/) - consult it for the vendor's patched-release statement before upgrading, and pin the newest Transformers release the vendor confirms as fixed. Until a patched version is verified, treat checkpoint conversion as a trust boundary: only run SEW-D convert_config against checkpoints from trusted first-party sources or after integrity verification (e.g., pinned hashes/signed model artifacts), since a malicious checkpoint is the sole delivery vector and skipping untrusted conversions eliminates exposure at the cost of blocking community-model conversion workflows. Where conversion of external checkpoints is operationally required, sandbox it - run the conversion inside an isolated container or VM with no credentials, no network egress, and a non-privileged user, and accept the trade-offs of added operational friction and reduced throughput. Avoid passing untrusted config strings into conversion helpers, and audit any wrapper scripts that automate conversion of downloaded checkpoints.

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 CWE-94 (Improper Control of Generation of Code / code injection) in the SEW-D architecture's convert_config routine, part of Transformers' model checkpoint conversion utilities. Rather than treating checkpoint configuration values as inert data, the conversion path passes a user-supplied string into Python code execution, so a crafted checkpoint could inject arbitrary statements at load time. Because the sink sits in a conversion helper rather than in model inference, exploitation is gated by the pipeline action of converting an untrusted checkpoint, and any code runs in the interpreter of the converting user (S:U, no privilege boundary crossed). The CPE identifies huggingface:transformers:4.57.0 as the affected build, and the issue was reported through Trend Micro Zero Day Initiative as ZDI-CAN-28252 / ZDI-25-1148.

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

File-borne code injection triggered only when a user converts a malicious checkpoint, so AV:L and UI:R; no auth needed (PR:N) and arbitrary code execution yields full C/I/A impact.

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 SEW-D 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-28252.

Executive ViewAI

Why It Matters

Hugging Face Transformers contains a code injection flaw (CVE-2025-14927) in the SEW-D model conversion path that lets a malicious model checkpoint execute arbitrary Python on the machine of whoever converts it. Because exploitation requires a staff member to deliberately run a conversion on an untrusted checkpoint, exposure is concentrated in data science and ML engineering teams that import third-party or community models rather than in customer-facing systems. Leadership should care because a single compromised checkpoint could give an attacker the same access as the analyst running the job, potentially exposing training data, model artifacts, and connected cloud credentials.

Business Impact: Medium
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: convert only trusted, first-party checkpoints; verify model provenance and checksums before conversion; run all conversions in a disposable, least-privilege container or sandbox with no production credentials or broad network egress; prefer safetensors weights over pickle-based formats; and monitor the vendor advisory for a fixed release.

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
Medium

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