Cyber Resilience

CVE-2026-58659

Lightningai Pytorch Lightning ≤ 2.6.5

Public PoC
Published
15 July 2026
Modified
08 October 2026
Patch / advisory
CVSS Score v4 8.4
Click a component to see what it means
Raw vectorCVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
EPSS Score 0.0063 48th percentile
Risk Priority 55 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2026-58659 is a high-severity Unsafe Reflection (CWE-470) vulnerability in Lightningai Pytorch Lightning. Its CVSS base score is 8.4 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Reflective Code Loading (T1620); ranked at the 48th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

This vulnerability is AI-related — categorised as Deep Learning Frameworks; in the Supply Chain and Deployment risk domain.

The strongest mitigations our analysis identified map to SI-10 (Information Input Validation) and AC-3 (Access Enforcement) — see the control section below for these in your framework.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

execute arbitrary code when LightningModule.load_from_checkpoint is called.

CWE(s)

AI Security AnalysisAI

AI Category
Deep Learning Frameworks
Risk Domain
Supply Chain and Deployment
OWASP Top 10 for LLMs 2025
None mapped
Classification Reason
Matched keywords: pytorch

Related Threats

MITRE ATT&CK Enterprise Techniques

T1620 Reflective Code Loading Stealth
Adversaries may reflectively load code into a process in order to conceal the execution of malicious payloads.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-44484Same product: Lightningai Pytorch Lightning
CVE-2026-31221Same product: Lightningai Pytorch Lightning
CVE-2024-5452Same product: Lightningai Pytorch Lightning
CVE-2024-8020Same product: Lightningai Pytorch Lightning
CVE-2024-8019Same product: Lightningai Pytorch Lightning
CVE-2024-5980Same product: Lightningai Pytorch Lightning
CVE-2024-8015Shared CWE-470
CVE-2025-63690Shared CWE-470
CVE-2026-70410Shared CWE-470
CVE-2024-7059Shared CWE-470

Affected Assets

lightningai
pytorch lightning
≤ 2.6.5

Mitigating Controls

Mitigating Controls (NIST 800-53 r5) AI

Input validation directly stops externally supplied class or method names from selecting improper code via reflection.

Enforces authorization checks on the code or classes ultimately invoked, blocking unauthorized selections even if reflection is used.

Limits privileges of any code reached through unsafe reflection, reducing blast radius without stopping the selection itself.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

ID.RA-01 partial match
blocks

Vulnerability identification processes can discover unsafe reflection during code review or scanning.

PR.PS-05 partial match
blocks

Preventing execution of unauthorized code can block exploitation of unsafe reflection at runtime.

PR.PS-06 partial match
blocks

Secure SDLC practices directly avoid introducing externally controlled class selection via reflection.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

blocks

A.8.25 mandates secure SDLC practices including secure coding guidelines, security requirements, checkpoints, testing (scans/penetration), and developer training that can catch/prevent unsafe reflection flaws during development; this stops exploitation for a minority slice (first-party code written under the process) but leaves the bulk of the weakness (e.g. in third-party libraries, legacy code, or incomplete enforcement) untouched.

blocks

Application security requirements can explicitly prohibit or constrain reflection based on untrusted input.

blocks

A.8.27 mandates security-by-design principles (e.g. distrust external input, least privilege, secure session control, data validation/sanitization, design reviews against attack patterns) that reach a slice of unsafe reflection cases but leave a bounded remainder (e.g. reflection in third-party libraries or dynamic class loading where principles are applied incompletely).

prevents

Secure coding standards directly forbid unsafe reflection and require whitelisting or static alternatives.

References