Vulnerability · Published Jul 15, 2026 · Assigned by VulnCheck

CVE-2026-58659PyTorch Lightning Arbitrary Code Execution via _instantiator Hyperparameter

High 7.8

In plain English

A high-severity security flaw in pytorch-lightning from Lightning-AI. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 50% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.8High
Exploit odds (30 days)0.6%top 49.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
PyPIlightning2.6.6GHSA-qqmf-gpg7-g8gw
PyPIlightning2.6.6PYSEC-2026-3624
PyPIpytorch-lightning2.6.6PYSEC-2026-3967

Affected products (as reported)

VendorProductVersions
Lightning-AI pytorch-lightning 0 – through 2.6.5

Weakness: CWE-470 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

References