Critical severity · published Apr 10, 2024
CVE-2024-3568
Arbitrary Code Execution via Deserialization in huggingface/transformers
9.6
CVSS
2.1%
EPSS
No
On KEV
Description
The huggingface/transformers library is vulnerable to arbitrary code execution through deserialization of untrusted data within the `load_repo_checkpoint()` function of the `TFPreTrainedModel()` class. Attackers can execute arbitrary code and commands by crafting a malicious serialized payload, exploiting the use of `pickle.load()` on data from potentially untrusted sources. This vulnerability allows for remote code execution (RCE) by deceiving victims into loading a seemingly harmless checkpoint during a normal training process, thereby enabling attackers to execute arbitrary code on the targeted machine.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
Required
Confidentiality
High
Integrity
High
Availability
High
Scope
Changed
Exploitation
Is it being used?
Exploit prediction (EPSS)2.1% · higher than 81% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
HU
huggingface/transformers · huggingface
before 4.38 · source: vendor
TR
Transformers · Huggingface
before 4.38.0 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2024-3568
CVE.org
https://www.cve.org/CVERecord?id=CVE-2024-3568
Patch
https://github.com/huggingface/transformers/commit/693667b8ac8138b83f8adb6522ddaf42fa07c125
Exploit
https://huntr.com/bounties/b3c36992-5264-4d7f-9906-a996efafba8f
More from huggingface/transformers
9.6
CVE-2026-5241
Policy Bypass in LightGlue Nested Config Resolution in huggingface/transformers
8.8
CVE-2023-6730
Deserialization of Untrusted Data in huggingface/transformers
7.8
CVE-2026-4372
Arbitrary Remote Code Execution via `_attn_implementation_internal` Config Injection in huggingface/transformers
7.8
CVE-2026-1839
Arbitrary Code Execution via Unsafe torch.load() in Trainer Checkpoint Loading in huggingface/transformers
7.8
CVE-2023-7018
Deserialization of Untrusted Data in huggingface/transformers
