CVE-2026-31221: PyTorch-Lightning versions 2.6.0 and earlier contain an insecure deserialization vulnerability
Affects pytorchSource GCVE Database
Not known to be exploited · CVSS 8.8 High.
Data as of 24 Nov 2026, 20:26 UTC
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 12 May 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 23 Nov 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu 26.10pytorchpkg:deb/ubuntu/pytorch?arch=source&distro=stonkingOther threats | Affected
| Fixed in– |
Ubuntu 26.04 LTSpytorchpkg:deb/ubuntu/pytorch?arch=source&distro=resoluteOther threats | Affected
| Fixed in– |
Ubuntu 25.10pytorchpkg:deb/ubuntu/pytorch?arch=source&distro=questingOther threats | Affected
| Fixed in– |
Ubuntu 22.04 LTSpytorchpkg:deb/ubuntu/pytorch?arch=source&distro=jammyOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
PyTorch-Lightning versions 2.6.0 and earlier contain an insecure deserialization vulnerability (CWE-502) in the checkpoint loading mechanism. The LightningModule.load_from_checkpoint() method, which is commonly used to load saved model states, internally calls torch.load() without setting the security-restrictive weights_only=True parameter. This default behavior allows the deserialization of arbitrary Python objects via the Pickle module. A remote attacker can exploit this by providing a maliciously crafted checkpoint file, leading to arbitrary code execution on the victim's system when the file is loaded.