CVE-2026-31221

HIGH

PyTorch-Lightning <=2.6.0 - Deserialization

Title source: llm
STIX 2.1

Description

PyTorch-Lightning versions 2.6.0 and earlier contain an insecure deserialization vulnerability (CWE-502) in the checkpoint loading mechanism. The LightningModule.load_from_checkpoint() method, which is commonly used to load saved model states, internally calls torch.load() without setting the security-restrictive weights_only=True parameter. This default behavior allows the deserialization of arbitrary Python objects via the Pickle module. A remote attacker can exploit this by providing a maliciously crafted checkpoint file, leading to arbitrary code execution on the victim's system when the file is loaded.

Scores

CVSS v3 7.8
EPSS 0.0019
EPSS Percentile 40.7%
Attack Vector LOCAL
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

CISA SSVC

Vulnrichment
Exploitation none
Automatable no
Technical Impact total

Details

CWE
CWE-502
Status published
Products (2)
lightningai/pytorch_lightning < 2.6.0
pypi/pytorch-lightning 0 - 2.6.0PyPI
Published May 12, 2026
Tracked Since May 12, 2026