PT-2026-40060 · Pypi · Pytorch-Lightning

Published

2026-05-12

·

Updated

2026-05-12

·

CVE-2026-31221

CVSS v3.1

8.8

High

VectorAV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions PyTorch-Lightning versions 2.6.0 and earlier
Description An insecure deserialization issue exists in the checkpoint loading mechanism. The load from checkpoint() function in LightningModule internally calls torch.load() without the weights only=True parameter. This allows the deserialization of arbitrary Python objects via the Pickle module, which is a process of converting a byte stream back into an object. A remote attacker can provide a maliciously crafted checkpoint file to achieve arbitrary code execution on the system when the file is loaded.
Recommendations Update PyTorch-Lightning to a version later than 2.6.0. As a temporary workaround, avoid loading checkpoint files from untrusted sources using the load from checkpoint() function.

Exploit

Fix

Deserialization of Untrusted Data

Weakness Enumeration

Related Identifiers

CVE-2026-31221
GHSA-75M9-98V2-HJPM

Affected Products

Pytorch-Lightning