Skip to main content
VulnerabilityPublished Updated

CVE-2026-31221: PyTorch-Lightning versions 2.6.0 and earlier contain an insecure deserialization vulnerability

Affects pytorchSource GCVE Database

0
Compare
Authoritative record:CVE-2026-31221· High 8.8

Not known to be exploited · CVSS 8.8 High.

Data as of 24 Nov 2026, 20:26 UTC

CVSS 3.1 base score
8.8High
How severe the flaw is on the 0–10 CVSS scale.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 12 May 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
Ubuntu 26.10pytorchpkg:deb/ubuntu/pytorch?arch=source&distro=stonkingOther threatsAffected
  • =2.9.1+dfsg-1~exp1ubuntu2
  • =2.12.1+dfsg-1
Fixed in–
Ubuntu 26.04 LTSpytorchpkg:deb/ubuntu/pytorch?arch=source&distro=resoluteOther threatsAffected
  • =2.6.0+dfsg-7
  • =2.6.0+dfsg-9
  • =2.9.1+dfsg-1~exp1ubuntu2
Fixed in–
Ubuntu 25.10pytorchpkg:deb/ubuntu/pytorch?arch=source&distro=questingOther threatsAffected
  • =2.6.0+dfsg-5build1
  • =2.6.0+dfsg-7
Fixed in–
Ubuntu 22.04 LTSpytorchpkg:deb/ubuntu/pytorch?arch=source&distro=jammyOther threatsAffected
  • =1.7.1-7
  • =1.8.1-4
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.

References

Community reviews

Loading reviews…