CVE-2026-31221: n/a
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.
AI Analysis
Technical Summary
CVE-2026-31221 describes an insecure deserialization vulnerability (CWE-502) in PyTorch-Lightning versions 2.6.0 and earlier. The LightningModule.load_from_checkpoint() method internally calls torch.load() without setting the weights_only=True parameter, which would restrict deserialization to model weights only. This omission allows deserialization of arbitrary Python objects via Pickle, enabling a remote attacker to execute arbitrary code by providing a malicious checkpoint file. The vulnerability is rated high severity with a CVSS 3.1 score of 8.8, reflecting network attack vector, low attack complexity, no privileges required, user interaction required, and high impact on confidentiality, integrity, and availability. There is no vendor advisory or patch information available at this time.
Potential Impact
Successful exploitation can lead to arbitrary code execution on the victim system when a malicious checkpoint file is loaded. This compromises confidentiality, integrity, and availability of the affected system. The vulnerability can be triggered remotely by supplying a crafted checkpoint file, making it a significant risk for users loading checkpoints from untrusted sources.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, users should avoid loading checkpoint files from untrusted or unauthenticated sources. Consider manually inspecting checkpoint files or restricting usage to trusted environments. Monitor vendor channels for updates regarding patches or official mitigations.
CVE-2026-31221: n/a
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.
CVSS v3.1
Score 8.8high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-31221 describes an insecure deserialization vulnerability (CWE-502) in PyTorch-Lightning versions 2.6.0 and earlier. The LightningModule.load_from_checkpoint() method internally calls torch.load() without setting the weights_only=True parameter, which would restrict deserialization to model weights only. This omission allows deserialization of arbitrary Python objects via Pickle, enabling a remote attacker to execute arbitrary code by providing a malicious checkpoint file. The vulnerability is rated high severity with a CVSS 3.1 score of 8.8, reflecting network attack vector, low attack complexity, no privileges required, user interaction required, and high impact on confidentiality, integrity, and availability. There is no vendor advisory or patch information available at this time.
Potential Impact
Successful exploitation can lead to arbitrary code execution on the victim system when a malicious checkpoint file is loaded. This compromises confidentiality, integrity, and availability of the affected system. The vulnerability can be triggered remotely by supplying a crafted checkpoint file, making it a significant risk for users loading checkpoints from untrusted sources.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, users should avoid loading checkpoint files from untrusted or unauthenticated sources. Consider manually inspecting checkpoint files or restricting usage to trusted environments. Monitor vendor channels for updates regarding patches or official mitigations.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- mitre
- Date Reserved
- 2026-03-09T00:00:00.000Z
- Cvss Version
- null
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a034c84cbff5d8610fe99e6
Added to database: 05/12/2026, 15:51:32 UTC
Last enriched: 05/19/2026, 18:17:22 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 47
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.