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

[CVE catalog]

Severity
High · CVSS 7.8CVSS: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.

DistributionPackageReleaseVersionStatus
CpetransformersNot reported5.0.0fixed
CpetransformersNot reportedNot reportedunknown
PyPItransformersNot reported5.0.0fixed
PyPItransformersNot reported5.0.0rc3fixed
CpetransformersNot reportedNot reportedunknown

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
CpetransformerscpeNot reported5.0.0Not reportedNot reportedNot reported
PyPItransformersPyPINot reported5.0.0Not reportedPYSEC-2026-2288Not reported
PyPItransformersPyPINot reported5.0.0rc3Not reportedGHSA-69W3-R845-3855Not reported

OpenFactory catalog packages

No matching packages in this catalog.

Observed:

References