Advisory

GHSA-qqmf-gpg7-g8gw

Also known as: CVE-2026-58659, PYSEC-2026-3624, PYSEC-2026-3967

Summary

PyTorch Lightning allows arbitrary code execution through checkpoint _instantiator hyperparameters

Details

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.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2026-07-15 18:31 UTC
Modified
2026-09-24 15:45 UTC

Affected packages and fixes

lightning

PyPI · All systems

Affected

  • introduced 0, fixed 2.6.6 (ecosystem)

Fixed versions

2.6.6

Fix

  • Fixed version 2.6.6
    pip install --upgrade lightning==2.6.6

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences