PyTorch-Lightning versions 2.6.0 and earlier contain an insecure deserialization…
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- No fix listed
Attack profile from CVSS 3.1 · CISA ADP. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-502.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | — | all versions | — | No fix listed | CNA |
| — | pytorch-lightning (PyPI) | up to 2.6.0 | — | No fix listed | GHSA-75m9-98v2-hjpm |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
- pytorch-lightning (PyPI) Vendor— Affected up to 2.6.0 Fixed in — No fix listed GHSA-75m9-98v2-hjpm
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:lightningai:pytorch_lightning:*:*:*:*:*:python:*:* | up to 2.6.0 | Vulnerable | lightning-ai |
- cpe:2.3:a:lightningai:pytorch_lightning:*:*:*:*:*:python:*:* Versions up to 2.6.0 Vulnerable ·lightning-ai
Remediation
No fixed version listed by the sources yet.
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat AI Inference Server | Affected | No fix yet |
| Red Hat Enterprise Linux AI (RHEL AI) 3 | Affected | No fix yet |
| Red Hat OpenShift AI (RHOAI) | Affected | No fix planned: Will not fix |
Timeline
- 2026-10-02 Threatist record created from CVE-2026-31221
- 2026-10-03 Alias added: GHSA-75m9-98v2-hjpm
References
More lightning-ai Pytorch Lightning vulnerabilities
- TI-2024-05067 RCE via Property/Class Pollution in lightning-ai/pytorch-lightning CVSS 3.1CRITICAL 9.8
- TI-2024-05541 Arbitrary File Write via /v1/runs API endpoint in lightning-ai/pytorch-lightning CVSS 3.1CRITICAL 9.8
- TI-2024-07433 Arbitrary File Write/Overwrite in lightning-ai/pytorch-lightning CVSS 3.1CRITICAL 9.1
- TI-2026-42224 PyTorch Lightning Arbitrary Code Execution via _instantiator Hyperparameter CVSS 4.0HIGH 8.4
- TI-2024-07434 Denial of Service in lightning-ai/pytorch-lightning CVSS 3.0HIGH 7.5
- TI-2026-32421 Compromise of PyTorch Lightning PyPi Package Versions CVSS 4.0CRITICAL 9.3
Sources
- CVE-2026-31221 · CVE Program
- CVE-2026-31221 · NVD
- FIRST EPSS
- GHSA-75m9-98v2-hjpm · GitHub Advisory Database · CC BY 4.0
- CVE-2026-31221 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences