HighVulnerability
CVE-2026-31221: PyTorch-Lightning insecure deserialization in checkpoint loading
- Source
- NVD(opens in a new tab)
- Identifier
- CVE-2026-31221
- Published
- Record updated
- 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.
Affected packages in the Exposure Registry
Matched by package name and ecosystem. Each entry shows whether the package delegates to a language model and how many tracked packages depend on it.
- pytorch-lightningPyPILLM dependency since 2025-11-05 · 6 tracked dependents
Related items
- MediumAI broke the cybersecurity world. What’s next?Similar attack · The Verge (AI)
- InfoCVE-2026-123357: GROBID command execution through crafted PDF filename in Linux conversionSimilar attack · NVD/CVE Database
- MediumShai-Hulud Descendant Surfaces in Malicious Ruby Gem That Steals Credentials and Poisons AI ToolsSimilar attack · Socket Blog
- MediumCPython flaw exposes AI inference servers to sandbox escape attacksSimilar attack · CSO Online
- HighCVE-2026-88981: Kubeflow Pipelines enables users to build and deploy portable, scalable machine learning workflows. Prior to 2.18.0…Similar attack · NVD/CVE Database