# CVE-2026-58659: PyTorch Lightning Arbitrary Code Execution via _instantiator Hyperparameter

> CVE-2026-58659: PyTorch Lightning Arbitrary Code Execution via _instantiator Hyperparameter. CVSS 7.8 (CVSS 3.1).

Canonical: https://rewindex.com/cve/CVE-2026-58659
Last updated: 2026-10-24T21:10:00Z

- Published: 2026-07-15 17:02 UTC · Updated: 2026-10-24 21:10 UTC · Assigner: VulnCheck
- CVSS: 7.8 (CVSS 3.1) · Severity: High · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- EPSS: 0.63%, 50th percentile (scored 2026-10-25)
- CISA KEV: no
- CWE: CWE-470

## 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.

## Affected vendors and products

- Lightning-AI: pytorch-lightning

## Tracked companies

- [Lightning AI](https://rewindex.com/company/lightning-ai.md)

## References

- [CVE record on cve.org](https://www.cve.org/CVERecord?id=CVE-2026-58659)
- [NVD entry](https://nvd.nist.gov/vuln/detail/CVE-2026-58659)
- [https://github.com/Lightning-AI/pytorch-lightning/commit/d710d689510d50e800f53b3cd773cbca20b1f86f](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/issues/21822)
- [https://github.com/Lightning-AI/pytorch-lightning/pull/21832](https://github.com/Lightning-AI/pytorch-lightning/pull/21832)
- [https://www.vulncheck.com/advisories/pytorch-lightning-arbitrary-code-execution-via-instantiator-hyperparameter](https://www.vulncheck.com/advisories/pytorch-lightning-arbitrary-code-execution-via-instantiator-hyperparameter)

---

_Sources: CVE records from the CVE Program (cve.org). CVE® is a registered trademark of The MITRE Corporation. (https://www.cve.org/) This product uses data from the NVD API but is not endorsed or certified by the NVD. (https://nvd.nist.gov/) Known Exploited Vulnerabilities catalog from CISA. (https://www.cisa.gov/known-exploited-vulnerabilities-catalog) EPSS scores from FIRST (Exploit Prediction Scoring System). (https://www.first.org/epss/)_


---
Canonical: https://rewindex.com/cve/CVE-2026-58659 · Markdown: https://rewindex.com/cve/CVE-2026-58659.md · JSON: https://rewindex.com/api/v1/cves/CVE-2026-58659 · Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) · Generated 2026-10-26T02:15:34.168Z
