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.
CVE-2026-58659
Score 7.8 from GitHub Security Advisory (severity: HIGH) published 2026-07-15. a secondary CVSS source baseline 7.8; sources differ by 0.0.
- High severity, but no confirmed exploitation yet
No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.
- CVSS v3
- 7.8
- EG Score
- 7.8(high)
- EPSS
- 14.6%
- KEV
- Not listed
Published
July 15, 2026
Last Modified
July 18, 2026
Advisory Details (4)
Auto-updated Jul 15, 2026PyTorch Lightning Arbitrary Code Execution via _instantiator Hyperparameter | Advisories | VulnCheck
https://www.vulncheck.com/advisories/pytorch-lightning-arbitrary-code-execution-via-instantiator-hyperparameterfix(checkpoint): prevent arbitrary code execution via `_instantiator` in `load_from_checkpoint`
Fix merged in Lightning-AI/pytorch-lightning PR #21832 on 2026-07-14 — awaiting tagged release
https://github.com/Lightning-AI/pytorch-lightning/pull/21832Arbitrary code execution via the `_instantiator` hyperparameter in `LightningModule.load_from_checkpoint` — defeats `torch.load(weights_only=True)` · Issue #21822 · Lightning-AI/pytorch-lightning · GitHub
https://github.com/Lightning-AI/pytorch-lightning/issues/21822commit d710d689510d (Lightning-AI/pytorch-lightning)
Fix landed in Lightning-AI/pytorch-lightning commit d710d689510d — awaiting tagged release
https://github.com/Lightning-AI/pytorch-lightning/commit/d710d689510d50e800f53b3cd773cbca20b1f86fVendor Advisories for CVE-2026-58659(1)
These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.
Weakness Classification(1)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Data Freshness Timeline
(refreshed 14× in last 7d / 16× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
- 2026-07-22 14:08 UTCEPSS rescore
- 2026-07-22 14:08 UTCEPSS rescore
- 2026-07-21 15:25 UTCEPSS rescore
- 2026-07-21 15:25 UTCEPSS rescore
- 2026-07-20 17:08 UTCEPSS rescore
- 2026-07-19 14:31 UTCEPSS rescore
- 2026-07-19 02:37 UTCEG score recompute
- 2026-07-19 02:37 UTCGHSA enrichment
- 2026-07-19 02:29 UTCEPSS rescore
- 2026-07-18 10:04 UTCEPSS rescore
- 2026-07-17 03:29 UTCGHSA enrichment
- 2026-07-16 17:03 UTCEPSS rescore
- 2026-07-16 16:09 UTCGHSA enrichment
- 2026-07-16 04:48 UTCGHSA enrichment
- 2026-07-15 17:29 UTCEG score recompute
- 2026-07-15 17:28 UTCMITRE cvelistV5first tracked
Frequently asked(5)
What is CVE-2026-58659?
When was CVE-2026-58659 disclosed?
Is CVE-2026-58659 actively exploited?
What is the CVSS score of CVE-2026-58659?
How do I remediate CVE-2026-58659?
Dependency Blast Radius
Explore the affected products and dependency analysis for CVE-2026-58659
Is Your Infrastructure Affected by CVE-2026-58659?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.