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

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

highCVSS 3.0 8.8GHSA-wrfc-pvp9-mr9g

CVE-2024-11393 is a deserialization flaw in how Hugging Face Transformers parses MaskFormer model files. A crafted model file can run attacker code as the user who loads it. It affects transformers before 4.48.0. The fix in that release removes model conversion scripts from release wheels.

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

What an attacker can do

The advisory places the flaw in the parsing of MaskFormer model files. Input is not validated, so untrusted data is deserialized. Python deserialization of attacker-controlled bytes can execute code, and here it does so with the rights of the current user.

The attacker must get a malicious model file or page in front of the victim. That makes user interaction necessary. Unlike the sibling MobileViTV2 entry, the CVSS 3.0 vector rates attack complexity as low, which gives the higher score of 8.8.

The realistic path is a poisoned MaskFormer checkpoint shared through a model hub, a ticket attachment or a team drive. Whoever loads it on a workstation, GPU server or CI job gives the attacker that account's tokens, SSH keys and datasets. The linked pull request says the conversion scripts open pickle and old Torch .bin checkpoints, and calls a serious attack unlikely. It does not name the exact vulnerable function.

Who is affected

transformers from any earlier release up to but not including 4.48.0. You are most exposed if you load MaskFormer weights or run the model conversion scripts on files from outside sources. Check your 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 linked pull request 35296 makes release.py delete model conversion scripts when wheels are built, because they open insecure formats such as pickle. No further workaround appears in the sources read. Until you upgrade, only load model files from sources you trust.

How to tell if you were hit

List the MaskFormer checkpoints loaded on your machines and where each came from. Look for unexpected child processes, network connections or new files written by Python processes right after a model load. Check shell history and CI logs for runs of conversion scripts on downloaded files.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Hugging Face Transformers MaskFormer 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 parsing 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-25191.

Questions

How is CVE-2024-11393 different from CVE-2024-11392?

It concerns MaskFormer model file parsing instead of MobileViTV2 configuration handling. Its CVSS 3.0 vector rates attack complexity as low, so the score is 8.8 against 7.5.

Do I need to run a server for this to matter?

No. It is a client-side risk. Any process that loads an untrusted MaskFormer file can run attacker code.

What is the patched version?

transformers 4.48.0, per the package data. The linked pull request removes conversion scripts from release wheels.

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