CVE-2024-11392: Hugging Face Transformers Remote Code Execution Vulnerability
Summary
CVE-2024-11392: Deserialization of Untrusted Data in Hugging Face Transformers. Affects transformers versions < 4.48.0. Fixed in 4.48.0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Hugging Face Transformers is a popular open-source library designed for natural language processing tasks. It provides pre-trained models and tools for tasks such as text classification, translation, and summarization. The library is widely used in both academic and commercial settings due to its ease of use and extensive model repository. However, it is vulnerable to a critical issue that allows remote code execution due to improper handling of configuration files.
Vulnerability Detail
The vulnerability identified as CVE-2024-11392 pertains to the deserialization of untrusted data within the Hugging Face Transformers library, specifically in the MobileViTV2 model. This flaw arises from inadequate validation of user-supplied data, enabling an attacker to execute arbitrary code on affected installations. The exploitation requires user interaction, such as visiting a malicious webpage or opening a compromised file, which can lead to severe consequences, including unauthorized access to sensitive data and system compromise.
How To Fix
Latest published version: 5.20.2 as of 22 Oct 2026
pip install --upgrade "transformers==5.20.2"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
4.48.0
This is the first release that contains the fix.
pip install --upgrade "transformers==4.48.0"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, users are advised to avoid opening untrusted configuration files or visiting suspicious links that may exploit this vulnerability until the package is updated.
Conclusion
The Hugging Face Transformers library has a critical vulnerability (CVE-2024-11392) that allows remote code execution due to improper deserialization of user-supplied data. Users are strongly encouraged to update to version 4.48.0 or later to mitigate this risk. Until then, exercising caution with untrusted files and links is essential.
See every vulnerability recorded for transformers →
FAQ
CVE-2024-11392 is a vulnerability in the Hugging Face Transformers library that allows remote code execution due to deserialization of untrusted data.
You can check if your application is affected by using Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit the Vulert playground at Vulert Scanner to analyze your Pipfile.lock.
If you cannot update the package right away, avoid interacting with untrusted files or links that could exploit this vulnerability.
The potential impacts include unauthorized code execution, data breaches, and complete system compromise, depending on the attacker's capabilities.
The CVSS score for this vulnerability is 7.5, indicating a high severity level.
References
Related vulnerabilities
Recent vulnerabilities recorded for transformers.