Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.4%top 69%

CVE-2026-31221: n/a

0
High
VulnerabilityCVE-2026-31221cvecve-2026-31221
Published: 05/12/2026 (05/12/2026, 00:00:00 UTC)
Source: CVE Database V5

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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Affected software

pytorch-lightning
pkg:pypi/pytorch-lightning
Affected versions
<2.6.1

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 05/19/2026, 18:17:22 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses