AI and data stack advisories

Severe, 6 weeks1496Projects326

1496 severe, 6 weeks · 326 projects

pytorch-lightningPYSEC-2026-3967

pytorch-lightning: remote code execution

pytorch-lightning

CVE-2026-58659 · Published Jul 15, 2026 · updated Sep 10, 2026

High7.8
Fix: upgrade to 2.6.6 or later
Source advisory

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 versions

PackageAffectedFixed in
pytorch-lightning
PyPI
< 2.6.62.6.6

Changes since it was listed

SeveritySep 25Severity: Unrated to High
Details and references

More pytorch-lightning advisories

All pytorch-lightning