Track vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
9.8
CVE-2024-5452: pytorch‑lightning can be remotely hijacked
CVE-2024-5452 · published 2 years ago
Summary
The PyTorch‑Lightning library lets a specially crafted data file change its own code when it processes user input. This can let an attacker run any command on a server that hosts the library with default settings. Update to the latest version or disable the vulnerable data‑processing feature to protect your system.
What to do
- Update lightning ai et al. lightning to version 2.3.3.
- Update pytorch-lightning to version 2.3.3.
- Update lightningai pytorch_lightning to version 2.3.3 or later.
Affected software
| Ecosystem | Vendor | Product | Affected versions |
|---|---|---|---|
| pip | lightning ai et al. | lightning |
< 2.3.3 Fix: upgrade to 2.3.3
|
| – | lightningai | pytorch_lightning |
< 2.3.3 cpe:2.3:a:lightningai:pytorch_lightning:*:*:*:*:*:python:*:* |
| PyPI | – | pytorch-lightning |
< 2.3.3 Fix: upgrade to 2.3.3
|
Original advisory text
Remote code execution in pytorch lightning
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.
References
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/5xxx/CVE-2024-5452.j... Vendor Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2024-5452 Vendor Advisory
- https://github.com/Lightning-AI/pytorch-lightning/issues/20038 URL
- https://github.com/lightning-ai/pytorch-lightning/commit/330af381de88cff17515418...
- https://github.com/Lightning-AI/pytorch-lightning/releases/tag/2.3.3 URL
- https://github.com/lightning-ai/pytorch-lightning Product
- https://pypi.org/project/lightning Product
- https://github.com/advisories/GHSA-cgwc-qvrx-rf7f Vendor Advisory
- https://huntr.com/bounties/486add92-275e-4a7b-92f9-42d84bc759da Exploit Third Party Advisory
Internet-facing
3 days
Internal
60 days
- Not known to be exploited
- Can be exploited automatically
- Gives an attacker full control
Type
CWE-913Improper Control of Dynamically-Managed Code Resources
CWE-915Improperly Controlled Modification of Dynamically-Determined Object Attributes
Timeline
Published6 Jun 2024
Updated30 Sep 2026
First seen6 Mar 2026
Track software like this
Free during beta