CVE-2024-3568: Arbitrary Code Execution via Deserialization in huggingface/transformers

Published Apr 10, 2024
·
Updated

The huggingface/transformers library is vulnerable to arbitrary code execution through deserialization of untrusted data within the loadrepocheckpoint() 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.

Affected Software

2 affected componentsFixes available
pip/transformers<4.38.0
4.38.0
huggingface transformers<4.38.0

Event History

Apr 10, 2024
CVE Published
via MITRE·05:07 PM
Data Sourced
via MITRE·05:07 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:15 PM
RemedyAffected Software
Advisory Published
via GitHub·06:30 PM

Frequently Asked Questions

1

What is the severity of CVE-2024-3568?

CVE-2024-3568 is categorized as a critical severity vulnerability due to its potential for arbitrary code execution.

2

How do I fix CVE-2024-3568?

To remediate CVE-2024-3568, upgrade the huggingface/transformers library to version 4.38.0 or later.

3

What does CVE-2024-3568 affect?

CVE-2024-3568 affects the huggingface/transformers library, specifically the `TFPreTrainedModel()` class.

4

Can CVE-2024-3568 allow attackers to execute arbitrary code?

Yes, CVE-2024-3568 allows attackers to execute arbitrary code through deserialization of untrusted data.

5

What function is vulnerable in CVE-2024-3568?

The `load_repo_checkpoint()` function in the `TFPreTrainedModel()` class is the vulnerable function in CVE-2024-3568.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203