{"id":"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.","modified":"2026-07-19T03:31:13.293736586Z","published":"2026-07-15T17:02:40.640Z","database_specific":{"cna_assigner":"VulnCheck","cwe_ids":["CWE-470"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/58xxx/CVE-2026-58659.json"},"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"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/lightning-ai/pytorch-lightning","events":[{"introduced":"0"},{"fixed":"be98784a1a03581b7051a355ae1084fd352d7cea"},{"fixed":"d710d689510d50e800f53b3cd773cbca20b1f86f"}],"database_specific":{"extracted_events":[{"introduced":"0"},{"fixed":"2.6.5"}],"source":["DESCRIPTION","REFERENCES"]}}],"versions":["2.6.4","2.6.0","2.5.0.post0","2.5.0","2.5.0rc0","2.4.0","2.3.0","2.2.0","2.2.0.rc0","2.1.0","2.1.0.rc1","2.1.0.rc0","2.0.0","2.0.0rc0","1.9.0","1.9.0rc0","1.8.0","1.8.0rc2","1.8.0rc1","1.8.0rc0","app/0.6.0rc0","1.7.0","1.7.0rc1","1.7.0rc0","1.6.0","1.6.0rc1","1.6.0rc0","1.5.0","1.5.0rc1","1.5.0rc0","1.4.0","1.4.0rc2","1.4.0rc1","1.4.0rc0","1.3.0","1.3.0rc3","1.3.0rc2","1.3.0rc1","1.3.0rc0","1.2.0","1.2.0rc2","1.2.0rc1","1.1.0","1.1.0rc2","1.1.0rc1","1.0.4","1.0.3","1.0.2","1.0.1","1.0.0","0.10.0","0.9.0","0.8.5","0.8.4","0.8.3","0.8.2","0.8.1","0.8.0","0.7.6","0.7.5","0.7.4","0.7.3","0.7.2","0.7.1","0.7.0","0.6.0","0.5.2.1","0.5.2","0.5.1","0.5.0","0.4.9","0.4.7","0.4.6","0.4.5","0.4.4","0.4.3","0.4.2","0.4.1","0.4.0","0.2.1","0.2","0.1.2","0.1.1","0.0.2","0.0.1"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-58659.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V4","score":"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"}]}