Skip to content
HighVulnerability

CVE-2026-31221: PyTorch-Lightning insecure deserialization in checkpoint loading

Identifier
CVE-2026-31221
Published
Record updated
View JSON
Affected
  • pytorch-lightning <= 2.6.0
Fixed in
No fixed version was stated when the source was last read.
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.4%

Summary

PyTorch-Lightning versions 2.6.0 and earlier contain an insecure deserialization flaw (CWE-502) in checkpoint loading. LightningModule.load_from_checkpoint() calls torch.load() without weights_only=True, so arbitrary Python objects can be deserialized via Pickle. A remote attacker who supplies a maliciously crafted checkpoint file can achieve arbitrary code execution when the file is loaded.

Mitigation

The source does not state a fix yet. Check the original advisory for updates.