CVE-2026-58659
PyTorch Lightning Arbitrary Code Execution via _instantiator Hyperparameter
- State
- Published
- Severity
- 8.4 High
- Published
- Jul 15, 2026
- Updated
- Oct 8, 2026
- Reserved
- Jul 1, 2026
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.
Scores
| CVSS | Score | Vector | Source |
|---|---|---|---|
| 4.0 | 8.4 High | 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 | VulnCheck |
| 3.1 | 7.8 High | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | VulnCheck |
Weaknesses
- CWE-470 Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')
Affected Products
| Product | Versions |
|---|---|
pytorch-lightningLightning-AI |
|
References
- Researcher Disclosuretechnical-descriptionexploit
- Pull Requestissue-tracking
- Patch Commitpatch
- https://www.vulncheck.com/advisories/pytorch-lightning-arbitrary-code-execution-via-instantiator-hyperparameterthird-party-advisory
Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.