Patch Commitpatch
https://github.com/Lightning-AI/pytorch-lightning/commit/d710d689510d50e800f53b3cd773cbca20b1f86f CVE-2026-58659
HIGH
PyTorch Lightning Arbitrary Code Execution via _instantiator Hyperparameter
Record summary
CVE-2026-58659 has a selected CVSS score of 8.4 (high).
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.
Description source: CVE List
Exploitation context
CISA SSVC decision
ExploitationPoC
AutomatableNo
Technical impactTotal
CISA Coordinator · SSVC 2.0.3 · Evaluated Jul 18, 2026 · Source: CVE List
Affected products and versions
1| Product | Source | Version range | Status |
|---|---|---|---|
pytorch-lightningBrowse Lightning-AI / pytorch-lightningDefault status: unaffected | CVE List | Through 2.6.5 | affected |
| d710d689510d50e800f53b3cd773cbca20b1f86f | unaffected |
References
5Researcher DisclosureTechnical descriptionexploit
https://github.com/Lightning-AI/pytorch-lightning/issues/21822 Pull Requestissue tracking
https://github.com/Lightning-AI/pytorch-lightning/pull/21832 nvd.nist.gov
https://nvd.nist.gov/vuln/detail/CVE-2026-58659 vulncheck.comThird-party advisory
https://www.vulncheck.com/advisories/pytorch-lightning-arbitrary-code-execution-via-instantiator-hyperparameter