High severity7.8OSV Advisory· Published Jul 15, 2026· Updated Oct 8, 2026
CVE-2026-58659
CVE-2026-58659
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
lightningPyPI | < 2.6.6 | 2.6.6 |
Affected products
32.6.4, 2.6.0, 2.5.0.post0, …+ 1 more
- (no CPE)range: 2.6.4, 2.6.0, 2.5.0.post0, …
- (no CPE)range: <=2.6.5
- cpe:2.3:a:lightningai:pytorch_lightning:*:*:*:*:*:python:*:*Range: <=2.6.5
Patches
Vulnerability mechanics
References
9- github.com/Lightning-AI/pytorch-lightning/commit/d710d689510d50e800f53b3cd773cbca20b1f86fnvdPatchWEB
- github.com/Lightning-AI/pytorch-lightning/pull/21832nvdIssue TrackingPatchWEB
- github.com/Lightning-AI/pytorch-lightning/issues/21822nvdExploitIssue TrackingMitigationWEB
- www.vulncheck.com/advisories/pytorch-lightning-arbitrary-code-execution-via-instantiator-hyperparameternvdExploitPatchThird Party AdvisoryWEB
- github.com/advisories/GHSA-qqmf-gpg7-g8gwghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-58659ghsaADVISORY
- github.com/Lightning-AI/pytorch-lightning/releases/tag/2.6.6ghsaWEB
- github.com/pypa/advisory-database/tree/main/vulns/lightning/PYSEC-2026-3624.yamlghsaWEB
- github.com/pypa/advisory-database/tree/main/vulns/pytorch-lightning/PYSEC-2026-3967.yamlghsaWEB
News mentions
0No linked articles in our index yet.