RCE via Property/Class Pollution in lightning-ai/pytorch-lightning
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Tampering
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-915.
Summary
A remote code execution (RCE) vulnerability exists in the lightning-ai/pytorch-lightning library version 2.2.1 due to improper handling of deserialized user input and mismanagement of dunder attributes by the `deepdiff` library. The library uses `deepdiff.Delta` objects to modify application state based on frontend actions. However, it is possible to bypass the intended restrictions on modifying dunder attributes, allowing an attacker to construct a serialized delta that passes the deserializer whitelist and contains dunder attributes. When processed, this can be exploited to access other modules, classes, and instances, leading to arbitrary attribute write and total RCE on any self-hosted pytorch-lightning application in its default configuration, as the delta endpoint is enabled by default.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- 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 |
|---|---|---|---|---|---|
| lightning-ai | lightning-ai/pytorch-lightning | before 2.3.3 | 2.3.3 | Patch available | CNA |
| — | lightning (PyPI) | before 2.3.3 | 2.3.3 | Patch available | GHSA-cgwc-qvrx-rf7f |
- lightning-ai/pytorch-lightning Vendorlightning-ai Affected before 2.3.3 Fixed in 2.3.3 Patch available CNA
- lightning (PyPI) Vendor— Affected before 2.3.3 Fixed in 2.3.3 Patch available GHSA-cgwc-qvrx-rf7f
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:lightningai:pytorch_lightning:*:*:*:*:*:python:*:* | before 2.3.3 | Vulnerable | lightning-ai |
- cpe:2.3:a:lightningai:pytorch_lightning:*:*:*:*:*:python:*:* Versions before 2.3.3 Vulnerable ·lightning-ai
Remediation
- Fix · CNA lightning-ai/pytorch-lightning (lightning-ai) Fixed in 2.3.3
- Fix · GHSA-cgwc-qvrx-rf7f lightning (PyPI) Fixed in 2.3.3 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2024-5452
- 2026-10-03 Alias added: GHSA-cgwc-qvrx-rf7f
References
More lightning-ai Pytorch Lightning vulnerabilities
- 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
- TI-2022-00751 Code Injection in pytorchlightning/pytorch-lightning CVSS 3.1CRITICAL 9.8
Sources
- CVE-2024-5452 · CVE Program
- CVE-2024-5452 · NVD
- FIRST EPSS
- GHSA-cgwc-qvrx-rf7f · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences