Security brief
Transformers Trainer checkpoint flaw depended on the PyTorch version in use
REVIEWCVE-2026-1839 involved unsafe loading of RNG state from an attacker-controlled checkpoint, rather than a generic PyTorch service breach.
What happened
The Transformers advisory describes unsafe checkpoint loading in Trainer’s RNG-state restoration. A malicious checkpoint file could reach torch.load without the weights-only restriction and execute code when loaded in the affected workflow.
The advisory identifies the relevant combination as Transformers releases supporting torch 2.2 or later, used with PyTorch below 2.6. Its listed Transformers affected range is below 5.0.0rc3, with that release providing the fix.
Use maintained, patched dependencies and avoid loading untrusted training checkpoints in a privileged environment. Check both Transformers and PyTorch versions; a headline naming only PyTorch obscures which library workflow and dependency combination creates this risk.
Next step
Update affected dependencies and isolate untrusted checkpoint loading.
What remains unknown
- Open question
- The sources reviewed do not establish whether your deployment was exploited.
Source references
-
GIT
Technical details
- CVE
CVE-2026-1839