{"id":"CVE-2026-58659","published":"2026-07-15T17:02:40Z","modified":"2026-11-08T14:07:14Z","title":"PyTorch Lightning Arbitrary Code Execution via _instantiator Hyperparameter","vendor":"Lightning-AI","product":"pytorch-lightning","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00626,"percentile":0.50955,"provenance":"source"},"cwes":[{"id":"CWE-470","name":"Use of Externally-Controlled Input to Select Classes or Code"}],"references":[{"url":"https://github.com/Lightning-AI/pytorch-lightning/issues/21822","tags":["technical-description","exploit","issue-tracking"]},{"url":"https://github.com/Lightning-AI/pytorch-lightning/pull/21832","tags":["issue-tracking","patch"]},{"url":"https://github.com/Lightning-AI/pytorch-lightning/commit/d710d689510d50e800f53b3cd773cbca20b1f86f","tags":["patch"]},{"url":"https://www.vulncheck.com/advisories/pytorch-lightning-arbitrary-code-execution-via-instantiator-hyperparameter","tags":["third-party-advisory"]}],"priority":{"score":20.7,"factors":[{"name":"EPSS percentile","points":10.19},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"lightning-ai","affectedVersions":[{"vendor":"Lightning-AI","product":"pytorch-lightning","versions":["<= 2.6.5"]}],"fixedVersions":[{"vendor":"Lightning-AI","product":"pytorch-lightning","versions":["d710d689510d50e800f53b3cd773cbca20b1f86f"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2026-07-18T01:02:53.086792Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"lightning","vulnerableRanges":["<2.6.6"],"patched":["2.6.6"],"from":["GHSA-qqmf-gpg7-g8gw","PYSEC-2026-3624"],"provenance":"source"},{"ecosystem":"PyPI","package":"pytorch-lightning","vulnerableRanges":["<2.6.6"],"patched":["2.6.6"],"from":["PYSEC-2026-3967"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-44751","exploited":false,"provenance":"source"},"exploitRefs":["https://github.com/Lightning-AI/pytorch-lightning/issues/21822"],"lineage":{"packageHistory":[{"cve":"CVE-2024-5980","published":"2024-06-27","fixed":"2.3.3","kev":false},{"cve":"CVE-2024-8019","published":"2025-03-20","fixed":"2.4.0","kev":false},{"cve":"CVE-2026-44484","published":"2026-05-14","fixed":"2.6.4","kev":false,"link":{"from":"CVE-2026-44484","to":"CVE-2026-58659","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:pytorch-lightning","fromFixed":"2.6.4","toFixed":"2.6.6","daysApart":62},{"kind":"version-step","provenance":"source","package":"PyPI:lightning","fromFixed":"2.6.4","toFixed":"2.6.6","daysApart":62}]}},{"cve":"CVE-2026-58659","published":"2026-07-15","fixed":"2.6.6","kev":false}],"package":"PyPI:pytorch-lightning"}}