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.3%top 75%

CVE-2026-58659: Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') in Lightning-AI pytorch-lightning

0
High
VulnerabilityCVE-2026-58659cvecve-2026-58659
Published: 07/15/2026 (07/15/2026, 17:02:40 UTC)
Source: CVE Database V5
Vendor/Project: Lightning-AI
Product: pytorch-lightning

Description

PyTorch Lightning through 2.6.5, fixed in commit d710d68, contains a remote code execution vulnerability in the _load_state function that imports and executes attacker-controlled module names from checkpoint _instantiator hyperparameters. Attackers can craft malicious checkpoint files that bypass weights_only=True protections to execute arbitrary code when LightningModule.load_from_checkpoint is called.

CVSS v4.0

Score 8.4high

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Affected software

GitHub Actionsmore threats →cve
pytorch-lightning
pkg:github/pytorch-lightning
Affected versions
<=2.6.5

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: 07/22/2026, 22:48:40 UTC

Technical Analysis

CVE-2026-58659 is a remote code execution vulnerability in PyTorch Lightning through version 2.6.5. The issue arises from the _load_state function importing and executing attacker-controlled module names derived from checkpoint _instantiator hyperparameters. This unsafe reflection allows crafted malicious checkpoint files to bypass protections intended to restrict code execution (weights_only=True) and execute arbitrary code during the loading of a LightningModule checkpoint. The vulnerability has a CVSS 4.0 score of 8.4, indicating high severity. There is no explicit vendor advisory or patch information provided, and the remediation level is not specified.

Potential Impact

An attacker who can supply a malicious checkpoint file can achieve remote code execution on systems loading that checkpoint with PyTorch Lightning versions up to 2.6.5. This bypasses intended protections and allows arbitrary code execution in the context of the application using LightningModule.load_from_checkpoint.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, avoid loading untrusted checkpoint files with LightningModule.load_from_checkpoint to prevent exploitation.

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
VulnCheck
Date Reserved
2026-07-01T21:54:37.946Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 6a57c45368715ace431fb2a0

Added to database: 07/15/2026, 17:33:07 UTC

Last enriched: 07/22/2026, 22:48:40 UTC

Last updated: 08/29/2026, 10:52:09 UTC

Views: 75

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