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
This high-severity CVE scores 7.8 under the CNA's CVSS (NVD's own analysis pending). EPSS exploit-prediction score not yet available (the EPSS model rescores nightly; freshly-published CVEs typically appear within 48 hours). GitHub Security Advisory data not yet ingested — confidence will rise once GHSA publishes (typical lag: hours to days for open-source ecosystem CVEs; never for infrastructure-only CVEs).
- 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(low)
- EPSS
- —
- KEV
- Not listed
Published
July 15, 2026
Last Modified
July 15, 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 2× in last 7d / 2× 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-15 17:29 UTCEG score recompute
- 2026-07-15 17:28 UTCMITRE cvelistV5first tracked
Frequently asked(4)
What is CVE-2026-58659?
When was CVE-2026-58659 disclosed?
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.