CVE-2026-31221

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.

Severity
HIGH
CVSS v3
7.8
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H · source nvd
Exploit chance (EPSS)
0.385%
chance of exploitation in the next 30 days
higher than 33.1% of scored CVEs · 2026-11-17
CISA KEV
Not listed
Public exploit code
Yes
Exploit references (NVD and CNA): 1
Metasploit modules: 0
Nuclei templates: 0

Weakness

CISA SSVC decision points

Exploitationnone
Automatableno
Technical impacttotal
Scored2026-05-15

Timeline

  1. 2026-05-12Published by the CNA00:00 UTC
  2. 2026-05-12GitHub advisory published (GHSA-75m9-98v2-hjpm)same day
  3. 2026-05-15CISA SSVC decision recorded3 days after publication

The timeline shows what already happened. To be told when this CVE changes next, watch it from the API.

Exploit and advisory records

GitHub advisory GHSA-75m9-98v2-hjpm, affected packages:

PackageVulnerable versionsFixed in
PyPI pytorch-lightningthrough 2.6.0

Affected products

Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.

ProductVulnerable versionsFixed in
lightningai pytorch_lightningthrough 2.6.0no fix listednot listed

Products and versions as NVD and the vendor that published the CVE list them.

References

Get more CVE data from the API.

Free without a key or signup. Pro adds monitoring and higher limits: pricing.

Sources