{"id":"CVE-2026-58659","aliases":["CVE-2026-58659","GHSA-qqmf-gpg7-g8gw","PYSEC-2026-3624","PYSEC-2026-3967"],"related":[],"kind":"vulnerability","state":"published","title":"PyTorch Lightning Arbitrary Code Execution via _instantiator Hyperparameter","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"es","text":"PyTorch Lightning hasta la versión 2.6.5, corregido en el commit d710d68, contiene una vulnerabilidad de ejecución remota de código en la función _load_state que importa y ejecuta nombres de módulos controlados por el atacante desde los hiperparámetros _instantiator del punto de control. Los atacantes pueden crear archivos de punto de control maliciosos que eluden las protecciones de weights_only=True para ejecutar código arbitrario cuando se llama a LightningModule.load_from_checkpoint.","source":"nvd"}],"published":"2026-07-15T17:02:40.640Z","modified":"2026-11-08T14:07:14.048Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","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,"rating":"HIGH"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","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,"rating":"HIGH"},{"scorer":"VulnCheck","scheme":"CVSS: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,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS: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,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","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/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"}],"cwes":["CWE-470"],"affected":[{"ranges":[{"type":"semver","introduced":"0","lastAffected":"2.6.5","status":"affected"},{"type":"git","version":"d710d689510d50e800f53b3cd773cbca20b1f86f","status":"unaffected"}],"vendor":"Lightning-AI","product":"pytorch-lightning","repo":"https://github.com/Lightning-AI/pytorch-lightning","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.6.6"}],"ecosystem":"PyPI","package":"lightning","purl":"pkg:pypi/lightning","source":"ghsa"},{"ranges":[{"status":"affected","lastAffected":"2.6.5"}],"vendor":"lightningai","product":"pytorch_lightning","cpe":"cpe:2.3:a:lightningai:pytorch_lightning:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.6.6"}],"ecosystem":"PyPI","package":"lightning","purl":"pkg:pypi/lightning","source":"pysec"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.6.6"}],"ecosystem":"PyPI","package":"pytorch-lightning","purl":"pkg:pypi/pytorch-lightning","source":"pysec"}],"references":[{"url":"https://github.com/Lightning-AI/pytorch-lightning/issues/21822","tags":["exploit","issue-tracking","mitigation","report","technical-description","web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/Lightning-AI/pytorch-lightning/pull/21832","tags":["fix","issue-tracking","patch","web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/Lightning-AI/pytorch-lightning/commit/d710d689510d50e800f53b3cd773cbca20b1f86f","tags":["fix","patch","web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://www.vulncheck.com/advisories/pytorch-lightning-arbitrary-code-execution-via-instantiator-hyperparameter","tags":["exploit","fix","patch","third-party-advisory","web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-58659","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/Lightning-AI/pytorch-lightning","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/Lightning-AI/pytorch-lightning/releases/tag/2.6.6","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/advisories/GHSA-qqmf-gpg7-g8gw","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/lightning/PYSEC-2026-3624.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/pytorch-lightning/PYSEC-2026-3967.yaml","tags":["web"],"sources":["ghsa"]}],"credits":["George Chen"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-07-18T01:02:53.086Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-58659","url":"https://www.cve.org/CVERecord?id=CVE-2026-58659","licence":"CVE Terms of Use","modified":"2026-11-08T14:07:14.048Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-qqmf-gpg7-g8gw","url":"https://github.com/advisories/GHSA-qqmf-gpg7-g8gw","licence":"CC-BY-4.0","modified":"2026-09-24T15:45:09.719Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-58659","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-58659","licence":"Public domain","modified":"2026-10-24T21:10:00.130Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-3624","url":"https://osv.dev/vulnerability/PYSEC-2026-3624","licence":"CC-BY-4.0","modified":"2026-09-10T13:10:44.573Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-3967","url":"https://osv.dev/vulnerability/PYSEC-2026-3967","licence":"CC-BY-4.0","modified":"2026-09-10T17:00:03.267Z"}],"updatedAt":"2026-11-25T22:59:28.325Z","epss":{"score":0.00326,"percentile":0.27674,"date":"2026-12-01T12:00:22.000Z"}}