Description
PyTorch Lightning through 2.6.6 contains an insecure deserialization vulnerability in FSDPStrategy.load_checkpoint that ignores weights_only=True when loading local single-file checkpoints. Attackers who supply a crafted checkpoint can embed a pickle payload that _LazyLoadingUnpickler resolves through unrestricted find_class, executing code as the training user.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| lightning-ai | PyTorch Lightning | 0 ≤2.6.6 | — |
References
- https://github.com/Lightning-AI/pytorch-lightning/blob/2.6.6/src/lightning/fabric/utilities/load.py#L179-L213
- https://github.com/Lightning-AI/pytorch-lightning/blob/2.6.6/src/lightning/fabric/strategies/fsdp.py#L601-L602
- https://www.vulncheck.com/advisories/pytorch-lightning-through-2.6.6-insecure-deserialization-via-fsdp-checkpoint-loading