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

- Severity: High 8.4 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.33%, higher than 27% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2026-07-15T17:02:40.640Z
- Modified: 2026-11-08T14:07:14.048Z
- Also known as: GHSA-qqmf-gpg7-g8gw, PYSEC-2026-3624, PYSEC-2026-3967
- Weaknesses: CWE-470
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: VulnCheck

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

(As written by CVE List.)

## Affected

- Lightning-AI pytorch-lightning: up to 2.6.5 (not affected: d710d689510d50e800f53b3cd773cbca20b1f86f)
- lightning (PyPI): before 2.6.6
- lightningai pytorch_lightning: up to 2.6.5
- pytorch-lightning (PyPI): before 2.6.6

## Every score

- VulnCheck: CVSS: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: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- GitHub: CVSS:4.0 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`
- PyPA Advisory Database: 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`

## References

- <https://github.com/Lightning-AI/pytorch-lightning/issues/21822> (exploit, issue-tracking, mitigation, report, technical-description, web)
- <https://www.vulncheck.com/advisories/pytorch-lightning-arbitrary-code-execution-via-instantiator-hyperparameter> (exploit, fix, patch, third-party-advisory, web)
- <https://github.com/Lightning-AI/pytorch-lightning/pull/21832> (fix, issue-tracking, patch, web)
- <https://github.com/Lightning-AI/pytorch-lightning/commit/d710d689510d50e800f53b3cd773cbca20b1f86f> (fix, patch, web)
- <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)

## Sources

- CVE List: [CVE-2026-58659](https://www.cve.org/CVERecord?id=CVE-2026-58659), CVE Terms of Use, modified 2026-11-08
- GitHub Advisory Database: [GHSA-qqmf-gpg7-g8gw](https://github.com/advisories/GHSA-qqmf-gpg7-g8gw), CC-BY-4.0, modified 2026-09-24
- NVD: [CVE-2026-58659](https://nvd.nist.gov/vuln/detail/CVE-2026-58659), Public domain, modified 2026-10-24
- PyPA Advisory Database: [PYSEC-2026-3624](https://osv.dev/vulnerability/PYSEC-2026-3624), CC-BY-4.0, modified 2026-09-10
- PyPA Advisory Database: [PYSEC-2026-3967](https://osv.dev/vulnerability/PYSEC-2026-3967), CC-BY-4.0, modified 2026-09-10

---

Page: https://cve.day/CVE-2026-58659 · Whole record: https://cve.day/CVE-2026-58659.json · Rebuilt by cve.day 2026-11-25T22:59:28.325Z
