CVE-2026-58659

PyTorch Lightning Arbitrary Code Execution via _instantiator Hyperparameter

State
Published
Severity
8.4 High
Published
Jul 15, 2026
Updated
Oct 8, 2026
Reserved
Jul 1, 2026

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
4.08.4 HighCVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NVulnCheck
3.17.8 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HVulnCheck

Weaknesses

  • CWE-470 Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')

Affected Products

ProductVersions
pytorch-lightningLightning-AI
  • 2.6.5 and earlierAffected
  • d710d689510d50e800f53b3cd773cbca20b1f86fNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.