{"id":"CVE-2026-58659","aliases":["GHSA-qqmf-gpg7-g8gw","PYSEC-2026-3624","PYSEC-2026-3967"],"url":"https://o3.security/vulnerability/CVE-2026-58659","summary":"PyTorch Lightning Arbitrary Code Execution via _instantiator Hyperparameter","details":"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":"2026-07-15T17:02:40.640Z","modified":"2026-10-10T02:31:12.942130525Z","cvss":null,"epss":{"score":0.00326,"percentile":0.25728,"asOf":"2026-09-17"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"PyPI","name":"lightning","fixedVersion":"2.6.6"}],"fix":{"url":"https://github.com/Lightning-AI/pytorch-lightning/commit/d710d689510d50e800f53b3cd773cbca20b1f86f","label":"Lightning-AI/pytorch-lightning@d710d68"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/58xxx/CVE-2026-58659.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-58659"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/pytorch-lightning-arbitrary-code-execution-via-instantiator-hyperparameter"},{"type":"REPORT","url":"https://github.com/Lightning-AI/pytorch-lightning/pull/21832"},{"type":"FIX","url":"https://github.com/Lightning-AI/pytorch-lightning/commit/d710d689510d50e800f53b3cd773cbca20b1f86f"},{"type":"PACKAGE","url":"https://github.com/Lightning-AI/pytorch-lightning"},{"type":"EVIDENCE","url":"https://github.com/Lightning-AI/pytorch-lightning/issues/21822"},{"type":"WEB","url":"https://github.com/Lightning-AI/pytorch-lightning/releases/tag/2.6.6"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-qqmf-gpg7-g8gw"},{"type":"WEB","url":"https://github.com/pypa/advisory-database/tree/main/vulns/lightning/PYSEC-2026-3624.yaml"},{"type":"WEB","url":"https://github.com/pypa/advisory-database/tree/main/vulns/pytorch-lightning/PYSEC-2026-3967.yaml"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-10T02:31:12.942130525Z"}}