High severity · published Jul 15, 2026
CVE-2026-58659
PyTorch Lightning Arbitrary Code Execution via _instantiator Hyperparameter
7.8
CVSS
0.6%
EPSS
No
On KEV
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 vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Attack vector
Local
Complexity
Low
Privileges
None
User interaction
Required
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.6% · higher than 50% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
PY
pytorch-lightning · Lightning-AI
through 2.6.5 · source: vendor
PL
Pytorch Lightning · Lightningai
through 2.6.5 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-58659
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-58659
technical-description
https://github.com/Lightning-AI/pytorch-lightning/issues/21822
issue-tracking
https://github.com/Lightning-AI/pytorch-lightning/pull/21832
patch
https://github.com/Lightning-AI/pytorch-lightning/commit/d710d689510d50e800f53b3cd773cbca20b1f86f
third-party-advisory
https://www.vulncheck.com/advisories/pytorch-lightning-arbitrary-code-execution-via-instantiator-hyperparameter
More from pytorch-lightning
9.8
CVE-2026-44484
Compromise of PyTorch Lightning PyPi Package Versions
