CVE Watchtower

CVE-2026-1839Huggingface Transformers Deserialization of Untrusted Data

NVDCVSS scored by NVD (NIST)

Vulnerability Summary

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.
Severity Level
HIGH(7.8)
Published Date
Apr 7, 2026
Last Modified
Oct 26, 2026
Exploitation Status
Public exploit available
EPSS Score (30-Day)
0.39%Probability
Root Weakness (CWE)
The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.
CVSS v3.1 Base Metrics — Score 7.8 (HIGH)
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Attack VectorLocal
Attack ComplexityLow
Privileges RequiredNone
User InteractionRequired
ScopeUnchanged
ConfidentialityHigh
IntegrityHigh
AvailabilityHigh

Affected & Patched Versions

Affected Versions
  • Huggingface Transformers < 5.0.0
  • Huggingface Transformers
  • huggingface/transformers >= unspecified and < v5.0.0rc3
Patched Versions
  • Huggingface Transformers 5.0.0
  • huggingface/transformers v5.0.0rc3

What to do

Prioritize this fix. Exploit code is public, so attacks can follow quickly.

  1. Check whether you run Huggingface Transformers and which version.
  2. Update to a patched version listed above, then confirm the new version.
  3. Review logs and exposed services for signs of earlier compromise.

Timeline

  • Apr 7, 2026Published
  • Oct 26, 2026Record last modified

Score, severity and exploitation changes are tracked from the day Watchtower started logging them.

Get notified about new Huggingface Transformers CVEsYou are reading CVE-2026-1839. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alerts

More Huggingface Transformers CVEs

Data last checked: Nov 22, 2026 17:11 UTC