NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Transformers

CVE-2024-11394: Deserialization of Untrusted Data in Hugging Face Transformers

highCVSS 3.0 8.8GHSA-hxxf-235m-72v3

CVE-2024-11394 is a deserialization flaw in the Trax model file handling of Hugging Face Transformers. Loading a crafted Trax model file can run attacker code as the current user. transformers before 4.48.0 is affected. Version 4.48.0 is the patched release.

Published Nov 23, 2024 · Updated Aug 21, 2026 · Analysis Nov 1, 2026

What an attacker can do

The advisory says the flaw is in the handling of Trax model files. The code does not validate user-supplied data before deserializing it. Deserializing attacker-chosen data in Python can execute code, in this case with the privileges of the user running the process.

The attacker needs the victim to open a malicious file or visit a malicious page, so the attack needs user interaction. The CVSS 3.0 vector (8.8) rates attack complexity as low and requires no privileges.

The usual route is a Trax checkpoint passed around as a download or hub upload. A developer, notebook or pipeline that loads it hands the attacker the same access that account has: cloud credentials, API keys, source code and training data. The linked pull request notes that the conversion scripts handle pickle and old Torch .bin files, and the author considered a serious attack unlikely. The pull request does not name the Trax function involved.

Who is affected

transformers from any earlier release up to but not including 4.48.0. Only workflows that load Trax model files, or run conversion scripts on them, from untrusted sources are at risk. Check the version:

pip show transformers

transformers

Ecosystem
PyPI
Affected
>= 0, < 4.48.0
Fixed in
4.48.0
Check
pip show transformers

How to fix it

Upgrade to transformers 4.48.0:

pip install --upgrade "transformers>=4.48.0"

The change linked from the issue, pull request 35296, removes model conversion scripts from release wheels. The sources give no other workaround. Avoid loading Trax or other legacy model files you did not produce yourself.

How to tell if you were hit

Find where Trax model files entered your environment and whether any were opened on shared or privileged machines. Watch for odd child processes, outbound connections or new files from Python processes that were loading a model. Check whether the conversion scripts were run against downloaded files.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

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.

Questions

What does CVE-2024-11394 let an attacker do?

Run code as the user who loads a malicious Trax model file, through deserialization of untrusted data.

Is a user action required?

Yes. The advisory says the target must visit a malicious page or open a malicious file.

Is there a patched release?

Yes, transformers 4.48.0. Anything earlier is listed as vulnerable.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Transformers vulnerabilities

All Transformers entries