AVID-2026-R1487
Description
Arbitrary Code Execution via Deserialization in huggingface/transformers (CVE-2024-3568)
Details
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.
Reason for inclusion in AVID: CVE-2024-3568 describes arbitrary code execution via deserialization in the HuggingFace Transformers library when loading a potentially malicious checkpoint, enabling remote code execution through pickle.load. This directly concerns an AI framework used in building/training/serving AI models, i.e., an AI software stack. The vulnerability resides in a component (transformers) used to build/deploy general-purpose AI systems, representing a software supply-chain risk related to dependencies/artifacts in AI pipelines. The report provides explicit vulnerability behavior (RCE via deserialization of untrusted data) and references, giving sufficient evidence for classification.
References
- NVD entry
- https://huntr.com/bounties/b3c36992-5264-4d7f-9906-a996efafba8f
- https://github.com/huggingface/transformers/commit/693667b8ac8138b83f8adb6522ddaf42fa07c125
Affected or Relevant Artifacts
- Developer: huggingface
- Deployer: huggingface
- Artifact Details:
| Type | Name |
|---|---|
| System | huggingface/transformers |
Impact
AVID Taxonomy Categorization
- Risk domains: Security
- SEP subcategories: S0100: Software Vulnerability
- Lifecycle stages: L06: Deployment
CVSS
| Version | 3.0 |
| Vector String | CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:N/A:L |
| Base Score | 3.4 |
| Base Severity | 🟢 Low |
| Attack Vector | NETWORK |
| Attack Complexity | 🔴 High |
| Privileges Required | NONE |
| User Interaction | REQUIRED |
| Scope | CHANGED |
| Confidentiality Impact | NONE |
| Integrity Impact | NONE |
| Availability Impact | 🟢 Low |
CWE
| ID | Description |
|---|---|
| CWE-502 | CWE-502 Deserialization of Untrusted Data |
Other information
- Report Type: Advisory
- Credits:
- Date Reported: 2024-04-10
- Version: 0.3.3
- AVID Entry