Vulnerability in Lightning-Ai Pytorch-Lightning
CVE-2026-58659
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.
Published · last modified .
CVSS v3 metric
CVSS v3 base score 7.8 (High). Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H.
EPSS exploit prediction
EPSS: 0.006 (49.0th percentile), scored .
Very low probability of exploitation in the next 30 days; routine patching cadence is appropriate. 49th percentile — 49.0% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.003 · newest: 0.006 · change: +0.003
Affected products
- Lightning-Ai Pytorch-Lightning — versions 0, d710d689510d50e800f53b3cd773cbca20b1f86f
- Lightningai Pytorch Lightning
Weakness classification (CWE)
References
- github.com/Lightning-AI/pytorch-lightning/issues/21822 (Exploit, technical-description, exploit, Mitigation, Issue Tracking)
- github.com/Lightning-AI/pytorch-lightning/pull/21832 (issue-tracking, Patch, Issue Tracking)
- github.com/Lightning-AI/pytorch-lightning/commit/d710d689510d50e800f53b3cd773cb… (Patch, patch)
- www.vulncheck.com/advisories/pytorch-lightning-arbitrary-code-execution-via-ins… (Exploit, Patch, Third Party Advisory, third-party-advisory)
Frequently asked questions
- What is CVE-2026-58659?
- CVE-2026-58659 is a high-severity vulnerability in Lightning-Ai Pytorch-Lightning, classified under Use of Externally-Controlled Input to Select Classes or Code (Unsafe Reflection). CVSS score: 7.8/10. Published 2026-07-15.
- How severe is CVE-2026-58659?
- High severity. CVSS v3 base score is 7.8 out of 10.