PT-2026-40060 · Pypi · Pytorch-Lightning

CVE-2026-31221

·

Published

2026-05-12

·

Updated

2026-09-10

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

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2026-31221
GHSA-75M9-98V2-HJPM
PYSEC-2026-3043
PYSEC-2026-3972

Affected Products

Pytorch-Lightning