CVE-2024-11394: Transformers: RCE via Trax model deserialization
GHSA-hxxf-235m-72v3 HIGH PoC AVAILABLEAny team loading Trax model files through Hugging Face Transformers < 4.48.0 is exposed to remote code execution — including automated MLOps pipelines that pull from model hubs. Patch to 4.48.0 immediately and audit every model-loading path in your ML infrastructure. Treat untrusted model files the same way you treat untrusted executables.
Risk Assessment
CVSS 8.8 with ~59% EPSS indicates meaningful real-world exploitation probability. While user interaction is required, this bar is trivially cleared via social engineering, compromised model repositories, or automated pipelines that pull community models without verification. The attack requires no privileges and executes under the context of the loading process — in MLOps environments this is often a privileged service account with broad data/infrastructure access. Impact is amplified because Transformers is one of the most widely deployed ML libraries globally.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| transformers | pip | — | No patch |
| 160.4K
OpenSSF 4.9 7.9K dependents
Pushed yesterday 39% patched
~101d to patch
Full package profile →
| |||
| transformers | pip | >= 0, < 4.48.0 | 4.48.0 |
| 160.4K
OpenSSF 4.9 7.9K dependents
Pushed yesterday 39% patched
~101d to patch
Full package profile →
| |||
Severity & Risk
Attack Surface
Recommended Action
7 steps-
Patch immediately: upgrade transformers to >= 4.48.0 across all environments (training, inference, CI/CD).
-
Audit model provenance: inventory all locations where Trax model files are loaded and verify each source is trusted.
-
Restrict model loading: enforce allowlists for model sources; block loading from arbitrary URLs or unvetted user uploads.
-
Implement model signing: use cryptographic signatures (e.g., Sigstore/cosign) to verify model integrity before loading.
-
Apply least privilege: run model-loading processes with minimal OS permissions and network access, ideally in sandboxed containers.
-
Monitor for exploitation: alert on unexpected outbound connections or process spawning during model load events.
-
Review CI/CD pipelines: any automated job that loads Trax models from external registries should be updated before next run.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2024-11394?
Any team loading Trax model files through Hugging Face Transformers < 4.48.0 is exposed to remote code execution — including automated MLOps pipelines that pull from model hubs. Patch to 4.48.0 immediately and audit every model-loading path in your ML infrastructure. Treat untrusted model files the same way you treat untrusted executables.
Is CVE-2024-11394 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2024-11394, increasing the risk of exploitation.
How to fix CVE-2024-11394?
1. Patch immediately: upgrade transformers to >= 4.48.0 across all environments (training, inference, CI/CD). 2. Audit model provenance: inventory all locations where Trax model files are loaded and verify each source is trusted. 3. Restrict model loading: enforce allowlists for model sources; block loading from arbitrary URLs or unvetted user uploads. 4. Implement model signing: use cryptographic signatures (e.g., Sigstore/cosign) to verify model integrity before loading. 5. Apply least privilege: run model-loading processes with minimal OS permissions and network access, ideally in sandboxed containers. 6. Monitor for exploitation: alert on unexpected outbound connections or process spawning during model load events. 7. Review CI/CD pipelines: any automated job that loads Trax models from external registries should be updated before next run.
What systems are affected by CVE-2024-11394?
This vulnerability affects the following AI/ML architecture patterns: training pipelines, model serving, MLOps pipelines, model hub integrations, fine-tuning workflows, research/experimentation environments.
What is the CVSS score for CVE-2024-11394?
CVE-2024-11394 has a CVSS v3.1 base score of 8.8 (HIGH). The EPSS exploitation probability is 65.05%.
Technical Details
NVD Description
Hugging Face Transformers Trax 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 handling 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-25012.
Exploitation Scenario
An adversary publishes a Trax model to HuggingFace Hub under a name resembling a popular legitimate model (typosquatting) or directly contributes a malicious model to an open-source project. A data scientist or automated MLOps pipeline calls `from_pretrained()` or equivalent Trax loading logic, triggering deserialization of the attacker-controlled payload. The embedded malicious code executes in the context of the loading process — typically granting the attacker access to training data, cloud credentials stored in environment variables, GPU cluster credentials, or the ability to backdoor subsequent model outputs. In enterprise environments, this frequently leads to lateral movement via stolen IAM credentials or cloud metadata service access.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H References
- github.com/advisories/GHSA-hxxf-235m-72v3
- github.com/huggingface/transformers/issues/34840
- github.com/huggingface/transformers/pull/35296
- github.com/pypa/advisory-database/tree/main/vulns/transformers/PYSEC-2024-229.yaml
- nvd.nist.gov/vuln/detail/CVE-2024-11394
- zerodayinitiative.com/advisories/ZDI-24-1515
- github.com/Kwaai-AI-Lab/OpenAI-Petal Exploit
- github.com/NVIDIA-AI-Blueprints/video-search-and-summarization Exploit
- github.com/PLENOBot/pleno-video-analyser Exploit
- github.com/Piyush-Bhor/CVE-2024-11394 Exploit
- github.com/nomi-sec/PoC-in-GitHub Exploit
- zerodayinitiative.com/advisories/ZDI-24-1515/ 3rd Party VDB
Timeline
Related Vulnerabilities
CVE-2024-3568 9.6 HuggingFace Transformers: RCE via pickle deserialization
Same package: transformers CVE-2024-11393 8.8 Transformers: RCE via MaskFormer model deserialization
Same package: transformers CVE-2023-6730 8.8 HuggingFace Transformers: RCE via unsafe deserialization
Same package: transformers CVE-2024-11392 8.8 HuggingFace Transformers: RCE via config deserialization
Same package: transformers CVE-2023-7018 7.8 Transformers: unsafe deserialization enables RCE on load
Same package: transformers
AI Threat Alert