{"id":"CVE-2026-58659","state":"PUBLISHED","title":"PyTorch Lightning Arbitrary Code Execution via _instantiator Hyperparameter","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.","publishedAt":"2026-07-15T17:02:40.640Z","updatedAt":"2026-10-08T15:23:31.352Z","severity":{"score":8.4,"label":"High","version":"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","source":"VulnCheck"},"assigner":"VulnCheck","products":["Lightning-AI pytorch-lightning"],"affected":[{"vendor":"Lightning-AI","product":"pytorch-lightning","packageURL":"pkg:pypi/lightning","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThanOrEqual":"2.6.5","versionType":"semver"},{"version":"d710d689510d50e800f53b3cd773cbca20b1f86f","status":"unaffected","versionType":"git"}],"repo":"https://github.com/Lightning-AI/pytorch-lightning"}],"references":["https://github.com/Lightning-AI/pytorch-lightning/issues/21822","https://github.com/Lightning-AI/pytorch-lightning/pull/21832","https://github.com/Lightning-AI/pytorch-lightning/commit/d710d689510d50e800f53b3cd773cbca20b1f86f","https://www.vulncheck.com/advisories/pytorch-lightning-arbitrary-code-execution-via-instantiator-hyperparameter"],"weaknesses":["CWE-470"],"ingestedAt":"2026-10-29T20:12:24.861Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/58xxx/CVE-2026-58659.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-58659","state":"PUBLISHED","datePublished":"2026-07-15T17:02:40.640Z","dateUpdated":"2026-10-08T15:23:31.352Z","assignerShortName":"VulnCheck","assignerOrgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateReserved":"2026-07-01T21:54:37.946Z"},"containers":{"cna":{"title":"PyTorch Lightning Arbitrary Code Execution via _instantiator Hyperparameter","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"Lightning-AI","product":"pytorch-lightning","packageURL":"pkg:pypi/lightning","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThanOrEqual":"2.6.5","versionType":"semver"},{"version":"d710d689510d50e800f53b3cd773cbca20b1f86f","status":"unaffected","versionType":"git"}],"repo":"https://github.com/Lightning-AI/pytorch-lightning"}],"references":[{"url":"https://github.com/Lightning-AI/pytorch-lightning/issues/21822","name":"Researcher Disclosure","tags":["technical-description","exploit"]},{"url":"https://github.com/Lightning-AI/pytorch-lightning/pull/21832","name":"Pull Request","tags":["issue-tracking"]},{"url":"https://github.com/Lightning-AI/pytorch-lightning/commit/d710d689510d50e800f53b3cd773cbca20b1f86f","name":"Patch Commit","tags":["patch"]},{"url":"https://www.vulncheck.com/advisories/pytorch-lightning-arbitrary-code-execution-via-instantiator-hyperparameter","tags":["third-party-advisory"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV4_0":{"attackVector":"LOCAL","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"ACTIVE","vulnConfidentialityImpact":"HIGH","subConfidentialityImpact":"NONE","vulnIntegrityImpact":"HIGH","subIntegrityImpact":"NONE","vulnAvailabilityImpact":"HIGH","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED","version":"4.0","baseSeverity":"HIGH","baseScore":8.4,"vectorString":"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"}},{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV3_1":{"attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","version":"3.1","baseSeverity":"HIGH","baseScore":7.8,"vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-470","lang":"en","description":"Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')","type":"CWE"}]}],"providerMetadata":{"shortName":"VulnCheck","orgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateUpdated":"2026-10-08T15:23:31.352Z"},"tags":["x_open-source"],"datePublic":"2026-07-10T00:00:00.000Z","cpeApplicability":[{"nodes":[{"operator":"OR","cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:a:lightningai:pytorch_lightning:*:*:*:*:*:python:*:*","versionEndIncluding":"2.6.5"}]}]}],"credits":[{"lang":"en","value":"George Chen","type":"finder"}],"x_generator":{"engine":"vulncheck-endgame"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-07-18T01:02:53.086792Z","id":"CVE-2026-58659","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-07-18T01:03:17.592Z"}}]}}}