CVSS 3.1
7.8 highCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HHigh (7.8) in lightningai pytorch lightning. EPSS 0.4% estimated probability of exploitation activity in the next 30 days.
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HExplain CVE-2026-31221 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-31221?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-31221?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-31221 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.
From the NVD's CPE matches.
| Product | Affected |
|---|---|
| lightningai:pytorch_lightning | through 2.6.0 |
| Advisory | Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|---|
| GHSA-75m9-98v2-hjpm | PyPI | pytorch-lightning | <=2.6.0 | no fix published |
| PYSEC-2026-3043 | PyPI | pytorch-lightning | <=2.6.0 | no fix published |
| PYSEC-2026-3972 | PyPI | lightning | <=2.6.0 | no fix published |
| Distribution | Release | Package | Fixed in | Advisory |
|---|---|---|---|---|
| Ubuntu | 22.04:LTS, 25.10, 26.04:LTS and 1 more | pytorch | no fix listed | UBUNTU-CVE-2026-31221 |
From the distributions' data via OSV.dev: Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Ubuntu.
Red Hat rates this Important.
This is an Important arbitrary code execution flaw in PyTorch-Lightning due to insecure deserialization in its checkpoint loading mechanism. Red Hat products utilizing PyTorch-Lightning, such as Red Hat Enterprise Linux AI and Red Hat AI Inference Server, are affected if they process untrusted checkpoint files. An attacker can craft a malicious checkpoint file, which, when loaded, can lead to arbitrary code execution on the system.
To mitigate this issue, avoid loading PyTorch-Lightning checkpoint files from untrusted or unverified sources. Ensure that all checkpoint files originate from trusted environments to prevent the deserialization of malicious Python objects and subsequent arbitrary code execution.
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat AI Inference Server | rhaiis/vllm-cpu-rhel9 | Will not fix | |
| Red Hat AI Inference Server | rhaiis/vllm-cuda-rhel9 | Affected | |
| Red Hat AI Inference Server | rhaiis/vllm-rocm-rhel9 | Affected | |
| Red Hat AI Inference Server | rhaiis/vllm-tpu-rhel9 | Will not fix | |
| Red Hat Enterprise Linux AI (RHEL AI) 3 | rhelai3/bootc-aws-cuda-rhel9 | Affected | |
| Red Hat Enterprise Linux AI (RHEL AI) 3 | rhelai3/bootc-azure-cuda-rhel9 | Affected | |
| Red Hat Enterprise Linux AI (RHEL AI) 3 | rhelai3/bootc-azure-rocm-rhel9 | Affected | |
| Red Hat Enterprise Linux AI (RHEL AI) 3 | rhelai3/bootc-cuda-rhel9 | Affected | |
| Red Hat Enterprise Linux AI (RHEL AI) 3 | rhelai3/bootc-gcp-cuda-rhel9 | Affected | |
| Red Hat Enterprise Linux AI (RHEL AI) 3 | rhelai3/bootc-rocm-rhel9 | Affected | |
| Red Hat OpenShift AI (RHOAI) | rhoai/odh-vllm-gaudi-rhel9 | Will not fix |
Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-31221.
The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.