CVE-2024-3568

CRITICAL
Published Apr 10, 2024 Modified Oct 10, 2025 CWE-502

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.

Is your site exposed to CVE-2024-3568?

Run a free security scan — no signup, results in seconds.

CVSS v3.1 Score

9.6
CRITICAL
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Weakness Type (CWE)

CWE-502 Deserialization of Untrusted Data

Affected Products

Vendor Product
huggingface transformers

References

Frequently Asked Questions

What is CVE-2024-3568? +
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. It has a CVSS v3.1 base score of 9.6 (CRITICAL).
How severe is CVE-2024-3568? +
CVE-2024-3568 has a CVSS v3.1 score of 9.6 out of 10, rated CRITICAL. This is a critical vulnerability that should be patched immediately.
What products are affected by CVE-2024-3568? +
CVE-2024-3568 affects products from huggingface, specifically: transformers. Check the affected products table above for specific version ranges.
How do I check if I'm vulnerable to CVE-2024-3568? +
You can use Secably's free Website Scanner to check your website for known vulnerabilities. For infrastructure scanning, use the Port Scanner to identify exposed services that may be affected. Check the vendor advisories linked above for specific patch and version information.

Related Vulnerabilities

Don't wait for an exploit

Scan your website for vulnerabilities like CVE-2024-3568 — free, no signup required.