Hugging Face Transformers CVE-2025-14927
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessPublish malicious SEW-D checkpoint
-
DeliveryVictim downloads and converts checkpoint
-
ExploitUnvalidated string reaches convert_config
-
ExecutionPython code injection executes
-
ImpactArbitrary 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
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
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
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.
Primary rating from Vendor (trendmicro).
CVSS VectorVendor: trendmicro
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
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.
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
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
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
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