Remote code execution in pytorch lightning
CVE-2024-5452 · GHSA-cgwc-qvrx-rf7f · published 2024-06-06 · updated 2026-11-16
- Severity
- Critical
- CVSS score
- 9.8
- Chance of exploitation (EPSS)
- 26.8%
- Fixed in
- 2.3.3
- Exploitation Public proof of concept
- Automatable Yes
- Technical impact Total
- CISA SSVC
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.
Upgrade lightning to 2.3.3 or later, and pytorch-lightning to 2.3.3 or later.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| lightning | PyPI | < 2.3.3 | 2.3.3 |
| pytorch-lightning | PyPI | < 2.3.3 | 2.3.3 |
- CriticalLMDeploy has Remote Code Execution by Pickle Deserialization via handle_zmq_recv in lmdeploy/lmdeploy/pytorch/disagg/conn/engine_conn.pylmdeploy
- CriticalLMdeploy has Remote Code Execution by Pickle Deserialization via zmq_rpc.call_and_response() in InterLM/lmdeploylmdeploy
- CriticalSGLang: Unauthenticated RCE via --enable-custom-logit-processorsglang
- CriticalSGLanG: Multimodal scheduler deserializes untrusted pickle data on 0.0.0.0 ROUTER socketsglang
- Criticaln8n: HTTP Request Node Pagination Prototype Pollution to RCEn8n, n8n, n8n
- Criticaln8n Has an XML Node Prototype Pollution Patch Bypassn8n, n8n, n8n
- CriticalMalicious code in lightning (PyPI)lightning, lightning
- CriticalCompromise of PyTorch Lightning PyPi Package Versionspytorch-lightning, pytorch-lightning
- CriticalPyTorch Lightning path traversal vulnerabilitylightning, pytorch-lightning
- Criticalpytorch-lightning vulnerable to Arbitrary File Write via /v1/runs API endpointlightning, pytorch-lightning
- CriticalCode Injection in PyTorch Lightningpytorch-lightning
- HighPyTorch Lightning allows arbitrary code execution through checkpoint _instantiator hyperparameterslightning
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.