Skip to content
OpenAdvisories
High · 7.8 CVE-2026-58659 EUVD-2026-44751GHSA-qqmf-gpg7-g8gwPYSEC-2026-3624PYSEC-2026-3967

PyTorch Lightning Arbitrary Code Execution via _instantiator Hyperparameter

Published Jul 15, 2026 · Updated Nov 8, 2026 · Assigned by VulnCheck

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 products

VendorProductAffectedFixed
Lightning-AI pytorch-lightning ≤ 2.6.5 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI lightning < 2.6.6 2.6.6 GHSA-qqmf-gpg7-g8gw
PyPI pytorch-lightning < 2.6.6 2.6.6 PYSEC-2026-3967

References