Live threats

All CVEs / Lightningai

CVE-2026-31221Lightningai Pytorch Lightning

High 7.8

Priority
47
CVSS 3.1
7.8
EPSS
—
Auth required
Yes
Published
May 12, 2026
Updated
Nov 8, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-502
SSVC (CISA)
Exploitation: none · Automatable: no · Technical impact: total
Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Pytorch Lightning.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
PyPI lightning ≤ 2.6.0 no fixed version —
PyPI pytorch-lightning ≤ 2.6.0 no fixed version —
PyPI pytorch-lightning ≤ 2.6.0 no fixed version —

Per OSV / GitHub Advisories (PYSEC-2026-3972, GHSA-75m9-98v2-hjpm, PYSEC-2026-3043). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
lightningaipytorch_lightning≤ 2.6.0

Official sources

References

Links published by the sources. Open them with care.