
CVE catalog
CVE-2026-1839
A vulnerability in the HuggingFace Transformers library, specifically in the `Trainer` class, allows for arbitrary code execution. The `_load_rng_state()` method in `src/transformers/trainer.py` at li
- Severity
- High · CVSS 7.8
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Published
- Source
- [NVD] · [CVE record]
- EPSS
- 0.38% · Oct 25, 2026
A flaw was found in HuggingFace Transformers. A remote attacker can exploit this vulnerability by supplying a specially crafted checkpoint file (e.g., `rng_state.pth`). The `_load_rng_state()` method in the `Trainer` class loads this file using `torch.load()` without proper validation, specifically missing the `weights_only=True` parameter. This issue primarily affects systems using PyTorch versions below 2.6. Successful exploitation can lead to arbitrary code execution on the system where the file is loaded. transformers: HuggingFace Transformers: Arbitrary code execution via malicious checkpoint file The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Cpe | transformers | Not reported | 5.0.0 | fixed |
| Cpe | transformers | Not reported | Not reported | unknown |
| PyPI | transformers | Not reported | 5.0.0 | fixed |
| PyPI | transformers | Not reported | 5.0.0rc3 | fixed |
| Cpe | transformers | Not reported | Not reported | unknown |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Cpe | transformers | cpe | Not reported | 5.0.0 | Not reported | Not reported | Not reported |
| PyPI | transformers | PyPI | Not reported | 5.0.0 | Not reported | PYSEC-2026-2288 | Not reported |
| PyPI | transformers | PyPI | Not reported | 5.0.0rc3 | Not reported | GHSA-69W3-R845-3855 | Not reported |
OpenFactory catalog packages
No matching packages in this catalog.
Observed:
References
- [https://github.com/huggingface/transformers/commit/03c8082ba4594c9b8d6fe190ca9bed0e5f8ca396]
- [https://huntr.com/bounties/3c77bb97-e493-493d-9a88-c57f5c536485]
- [https://nvd.nist.gov/vuln/detail/CVE-2026-1839]
- [https://osv.dev/vulnerability/GHSA-69w3-r845-3855]
- [https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-1839.json]
[FIRST EPSS] · [National Vulnerability Database (NVD)] · [OSV Package Vulnerability Database] · [Red Hat security advisories and VEX]