Arbitrary Code Execution via Deserialization in huggingface/transformers
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-502.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| huggingface | huggingface/transformers | before 4.38 | 4.38 | Patch available | CNA |
| — | transformers (PyPI) | before 4.38.0 | 4.38.0 | Patch available | GHSA-37q5-v5qm-c9v8 |
- huggingface/transformers Vendorhuggingface Affected before 4.38 Fixed in 4.38 Patch available CNA
- transformers (PyPI) Vendor— Affected before 4.38.0 Fixed in 4.38.0 Patch available GHSA-37q5-v5qm-c9v8
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:huggingface:transformers:*:*:*:*:*:*:*:* | before 4.38.0 | Vulnerable | huggingface |
- cpe:2.3:a:huggingface:transformers:*:*:*:*:*:*:*:* Versions before 4.38.0 Vulnerable ·huggingface
Remediation
- Fix · CNA huggingface/transformers (huggingface) Fixed in 4.38
- Fix · GHSA-37q5-v5qm-c9v8 transformers (PyPI) Fixed in 4.38.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2024-3568
- 2026-10-03 Alias added: GHSA-37q5-v5qm-c9v8
References
More huggingface Transformers vulnerabilities
- TI-2026-04577 Policy Bypass in LightGlue Nested Config Resolution in huggingface/transformers CVSS 3.1CRITICAL 9.6
- TI-2025-06294 Regular Expression Denial of Service (ReDoS) in huggingface/transformers CVSS 3.1HIGH 7.5
- TI-2025-06027 Regular Expression Denial of Service (ReDoS) in huggingface/transformers CVSS 3.1HIGH 7.5
- TI-2025-02858 Regular Expression Denial of Service (ReDoS) in huggingface/transformers CVSS 3.1HIGH 7.5
- TI-2025-01837 Regular Expression Denial of Service (ReDoS) in huggingface/transformers CVSS 3.1HIGH 7.5
- TI-2024-11793 Regular Expression Denial of Service (ReDoS) in huggingface/transformers CVSS 3.1HIGH 7.5
Sources
- CVE-2024-3568 · CVE Program
- CVE-2024-3568 · NVD
- FIRST EPSS
- GHSA-37q5-v5qm-c9v8 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences