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
The vulnerability in PyTorch-Lightning (≤ 2.6.0) arises from the load_from_checkpoint() method calling torch.load() without the security-restrictive parameter weights_only=True. This omission allows deserialization of arbitrary Python objects via Pickle, leading to potential arbitrary code execution if a malicious checkpoint file is loaded. The issue is a classic insecure deserialization flaw (CWE-502) in the model checkpoint loading process. No CVSS score or official remediation is currently published.
Potential Impact
An attacker able to provide a malicious checkpoint file to a victim loading it with load_from_checkpoint() can execute arbitrary code on the victim's system. This could lead to full system compromise depending on the environment and privileges of the process loading the checkpoint. The vulnerability is local to the environment loading the checkpoint and requires attacker control or influence over the checkpoint file source.
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 using alternative safe loading mechanisms if possible.
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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in PyTorch-Lightning (≤ 2.6.0) arises from the load_from_checkpoint() method calling torch.load() without the security-restrictive parameter weights_only=True. This omission allows deserialization of arbitrary Python objects via Pickle, leading to potential arbitrary code execution if a malicious checkpoint file is loaded. The issue is a classic insecure deserialization flaw (CWE-502) in the model checkpoint loading process. No CVSS score or official remediation is currently published.
Potential Impact
An attacker able to provide a malicious checkpoint file to a victim loading it with load_from_checkpoint() can execute arbitrary code on the victim's system. This could lead to full system compromise depending on the environment and privileges of the process loading the checkpoint. The vulnerability is local to the environment loading the checkpoint and requires attacker control or influence over the checkpoint file source.
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 using alternative safe loading mechanisms if possible.
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: 5/12/2026, 3:51:32 PM
Last enriched: 5/12/2026, 4:07:50 PM
Last updated: 5/13/2026, 4:48:18 AM
Views: 6
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.