{"cve":"CVE-2026-58659","nvd":{"published":"2026-07-15T18:16:48.743","modified":"2026-10-24T21:10:00.130","status":"Analyzed","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.","cvss_v4":{"vector":"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","score":8.4},"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8},"cwes":["CWE-470"],"references":["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/pull/21832","https://www.vulncheck.com/advisories/pytorch-lightning-arbitrary-code-execution-via-instantiator-hyperparameter"],"products":["lightningai:pytorch_lightning"],"source":"nvd","synced_at":"2026-10-25T17:50:08.599881581+00:00"},"epss":{"cve":"CVE-2026-58659","score":0.00626,"percentile":0.49715,"date":"2026-10-25"},"kev":null,"osv":[{"id":"GHSA-qqmf-gpg7-g8gw","url":"https://osv.dev/vulnerability/GHSA-qqmf-gpg7-g8gw","summary":" PyTorch Lightning allows arbitrary code execution through checkpoint _instantiator hyperparameters","modified":"2026-09-24T15:45:09.719284514Z","packages":[{"ecosystem":"PyPI","name":"lightning","purl":"pkg:pypi/lightning","ranges":["<2.6.6"],"fixed":["2.6.6"]}]},{"id":"PYSEC-2026-3624","url":"https://osv.dev/vulnerability/PYSEC-2026-3624","summary":"","modified":"2026-09-10T13:10:44.573169284Z","packages":[{"ecosystem":"PyPI","name":"lightning","purl":"pkg:pypi/lightning","ranges":["<2.6.6"],"fixed":["2.6.6"]}]},{"id":"PYSEC-2026-3967","url":"https://osv.dev/vulnerability/PYSEC-2026-3967","summary":"","modified":"2026-09-10T17:00:03.267154781Z","packages":[{"ecosystem":"PyPI","name":"pytorch-lightning","purl":"pkg:pypi/pytorch-lightning","ranges":["<2.6.6"],"fixed":["2.6.6"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}