CVE-2026-58659
CVE-2026-58659 is a high-severity vulnerability in Lightningai Pytorch Lightning with a CVSS 3.x base score of 7.8. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-470.
Key facts
- Severity: High (CVSS 3.x base score 7.8)
- CVSS v4: 8.4
- EPSS exploit prediction: 0% (26th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-470
- Affected product: Lightningai Pytorch Lightning
- Published:
- Last modified:
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.
Frequently asked questions
- What is CVE-2026-58659?
- 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.
- How severe is CVE-2026-58659?
- CVE-2026-58659 has a CVSS 3.x base score of 7.8, rated high severity. It is exploitable over local access with low attack complexity, requires no privileges and user interaction. Impact on confidentiality is high, integrity high, and availability high.
- Is CVE-2026-58659 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 0% (26th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2026-58659?
- CVE-2026-58659 affects Lightningai Pytorch Lightning. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2026-58659?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its high severity, prioritise patching exposed systems.
- When was CVE-2026-58659 published?
- CVE-2026-58659 was published on 2026-07-15 and last updated on 2026-08-06.
References
- https://github.com/Lightning-AI/pytorch-lightning/commit/d710d689510d50e800f53b3cd773cbca20b1f86f
- https://github.com/Lightning-AI/pytorch-lightning/issues/21822
- https://github.com/Lightning-AI/pytorch-lightning/pull/21832
- https://www.vulncheck.com/advisories/pytorch-lightning-arbitrary-code-execution-via-instantiator-hyperparameter
Affected products (1)
- cpe:2.3:a:lightningai:pytorch_lightning:*:*:*:*:*:python:*:*
More vulnerabilities in Lightningai Pytorch Lightning
- CVE-2026-44484 — Critical (CVSS 9.8): PyTorch Lightning is a deep learning framework to pretrain and finetune AI models. Versions 2.6.2 and 2.6.2 have…
- CVE-2024-5980 — Critical (CVSS 9.8): A vulnerability in the /v1/runs API endpoint of lightning-ai/pytorch-lightning v2.2.4 allows attackers to exploit path…
- CVE-2024-5452 — Critical (CVSS 9.8): A remote code execution (RCE) vulnerability exists in the lightning-ai/pytorch-lightning library version 2.2.1 due to…
- CVE-2022-0845 — Critical (CVSS 9.8): Code Injection in GitHub repository pytorchlightning/pytorch-lightning prior to 1.6.0.
- CVE-2024-8019 — Critical (CVSS 9.1): In lightning-ai/pytorch-lightning version 2.3.2, a vulnerability exists in the `LightningApp` when running on a Windows…
- CVE-2026-31221 — High (CVSS 7.8): PyTorch-Lightning versions 2.6.0 and earlier contain an insecure deserialization vulnerability (CWE-502) in the…
All CVEs affecting Lightningai Pytorch Lightning →
Other CWE-470 (Unsafe Reflection) vulnerabilities
- CVE-2026-40008 — Critical (CVSS 9.8): Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') vulnerability in Apache IoTDB. The…
- CVE-2026-42027 — Critical (CVSS 9.8): Arbitrary Class Instantiation via Model Manifest in Apache OpenNLP ExtensionLoader Versions Affected: before…
- CVE-2025-34393 — Critical (CVSS 9.8): Barracuda Service Center, as implemented in the RMM solution, in versions prior to 2025.1.1, does not correctly verify…
- CVE-2025-53693 — Critical (CVSS 9.8): Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') vulnerability in Sitecore Sitecore…
- CVE-2023-6943 — Critical (CVSS 9.8): Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') vulnerability in Mitsubishi Electric…
- CVE-2021-31522 — Critical (CVSS 9.8): Kylin can receive user input and load any class through Class.forName(...). This issue affects Apache Kylin 2 version…