CVE-2026-58659
HIGH 8.4CVSS 4.0PyTorch Lightning allows arbitrary code execution through checkpoint _instantiator hyperparameters
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
- 15 Jul 2026
- Last modified
- 24 Oct 2026
- Assigned by
- disclosure@vulncheck.com
- NVD status
- Analyzed
- Weakness
- CWE-470
- Also known as
- GHSA-qqmf-gpg7-g8gwPYSEC-2026-3624PYSEC-2026-3967
- Sources
- NVDJSONOSV GHSA-qqmf-gpg7-g8gwJSONOSV PYSEC-2026-3624JSONOSV PYSEC-2026-3967JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | disclosure@vulncheck.com (Secondary) | CVSS 4.0 | HIGH 8.4 | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N | |
| OSV | PyPA | CVSS 4.0 | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X | |
| NVD | disclosure@vulncheck.com (Secondary) | CVSS 3.1 | HIGH 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | lightningai | pytorch_lightningcpe:2.3:a:lightningai:pytorch_lightning:*:*:*:*:*:python:*:* |
<= 2.6.5 | |
| OSV | PyPI | lightning | < 2.6.6 | 2.6.6 |
| OSV | PyPI | pytorch-lightning | < 2.6.6 | 2.6.6 |
References
- https://github.com/Lightning-AI/pytorch-lightning/commit/d710d689510d50e800f53b3cd773cbca20b1f86f · Patch, WEB, FIX
- https://github.com/Lightning-AI/pytorch-lightning/issues/21822 · Exploit, Issue Tracking, Mitigation, WEB, REPORT
- https://github.com/Lightning-AI/pytorch-lightning/pull/21832 · Issue Tracking, Patch, WEB, FIX
- https://www.vulncheck.com/advisories/pytorch-lightning-arbitrary-code-execution-via-instantiator-hyperparameter · Exploit, Patch, Third Party Advisory, WEB, FIX
- https://nvd.nist.gov/vuln/detail/CVE-2026-58659 · ADVISORY
- https://github.com/Lightning-AI/pytorch-lightning · PACKAGE
- https://github.com/Lightning-AI/pytorch-lightning/releases/tag/2.6.6 · WEB
- https://github.com/advisories/GHSA-qqmf-gpg7-g8gw · ADVISORY
- https://github.com/pypa/advisory-database/tree/main/vulns/lightning/PYSEC-2026-3624.yaml · WEB
- https://github.com/pypa/advisory-database/tree/main/vulns/pytorch-lightning/PYSEC-2026-3967.yaml · WEB
History
- 25 Nov 2026 21:03 UTC · NVD: first stored (published 15 Jul 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 15 Jul 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 15 Jul 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 15 Jul 2026)