CVE-2026-1839
Fixed in a distro release EPSS <1%CVSS 6.5
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 line 3059 calls `torch.load()` without the `weights_only=True` parameter. This issue affects all versions of the library supporting `torch>=2.2` when used with PyTorch versions below 2.6, as the `safe_globals()` context manager provides no protection in these versions. An attacker can exploit this vulnerability by supplying a malicious checkpoint file, such as `rng_state.pth`, which can execute arbitrary code when loaded. The issue is resolved in version v5.0.0rc3.
Products: huggingface/transformers
Fixed upstream
| Ecosystem | Package | Fixed in |
|---|---|---|
| PyPI | transformers | 5.0.0rc3 |
| PyPI | transformers | 5.0.0 |
Distro releases
| Release | Package | Fixed in |
|---|---|---|
| Chainguard | lmcache-cuda-12.8 | 0.4.4-r0 |
| Chainguard | nemo | 2.7.3-r1 |
| Chainguard | py3.10-transformers-4.51 | 0 |
| Chainguard | py3.10-transformers-4.56 | 4.56.2-r2 |
| Chainguard | py3.11-transformers-4.51 | 0 |
| Chainguard | py3.11-transformers-4.56 | 4.56.2-r2 |
| Chainguard | py3.12-transformers-4.51 | 0 |
| Chainguard | py3.12-transformers-4.56 | 4.56.2-r2 |
| Chainguard | py3.13-transformers-4.51 | 0 |
| Chainguard | py3.13-transformers-4.56 | 4.56.2-r2 |
| Chainguard | text-generation-inference | 3.3.7-r18 |
| Chainguard | tritonserver-backend-vllm-cuda-12.9 | 25.9.0_git20260617-r2 |
| Chainguard | tritonserver-backend-vllm-cuda-13.0 | 25.11-r7 |
| Chainguard | vllm-openai-cuda-12.9 | 0.19.1-r0 |