HighVulnerability
CVE-2026-1839: HuggingFace Transformers Trainer arbitrary code execution via torch.load
- Source
- NVD(opens in a new tab)
- Identifier
- CVE-2026-1839
- Published
- Record updated
- Affected
- transformers < 5.0.0rc3
- Fixed in
- 5.0.0rc3
- released January 14, 2026, 83 days before disclosure
- Known exploitation
- Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
- EPSS
- 0.4%
Summary
CVE-2026-1839 affects the HuggingFace Transformers library, specifically the `Trainer` class. The `_load_rng_state()` method in `src/transformers/trainer.py` at line 3059 calls `torch.load()` without `weights_only=True`, and the issue affects all versions supporting `torch>=2.2` used with PyTorch versions below 2.6. An attacker who supplies a malicious checkpoint file such as `rng_state.pth` can execute arbitrary code when it is loaded.
Mitigation
The issue is resolved in version v5.0.0rc3.
Affected packages in the Exposure Registry
Matched by package name and ecosystem. Each entry shows whether the package delegates to a language model and how many tracked packages depend on it.
- transformersPyPILLM dependency since 2016-08-17 · 141 tracked dependents
Related items
- MediumCVE-2026-134825: Gradio 6.27.0 before 6.32.0 contains an authentication bypass vulnerability in gradio/history.py that allows remote…Same vendor · NVD/CVE Database
- MediumCVE-2026-124588: huggingface finetrainers code injection via Library argumentSame vendor · NVD/CVE Database
- HighCVE-2026-119120: Crawl4AI Docker API lets clients choose the HuggingFace model it loadsSame vendor · NVD/CVE Database
- HighGHSA-wf6j-7hvr-gr93: Hydra legacy target blacklist permits unsafe PyYAML loadingSame vendor · Hugging Face Security Advisories
- MediumCVE-2026-100653: vLLM unpinned Hugging Face artifact loads for FunAudioChat and Tarsier2Same vendor · NVD/CVE Database