Remote code execution in pytorch lightning
Critical9.8CVE-2024-5452 · Published Sep 10, 2026
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| pytorch-lightning PyPI | < 2.3.3 | 2.3.3 |
Details and references
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.
- CVSS 3.0
- CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Severity from
- the CVSS score
- Also known as
- CVE-2024-5452, GHSA-cgwc-qvrx-rf7f, PYSEC-2026-385
- nvd.nist.gov/vuln/detail/CVE-2024-5452
- github.com/Lightning-AI/pytorch-lightning/issues/20038
- github.com/lightning-ai/pytorch-lightning/commit/330af381de88cff17515418a341cbc1f9f127f9a
- github.com/Lightning-AI/pytorch-lightning/releases/tag/2.3.3
- github.com/lightning-ai/pytorch-lightning
- huntr.com/bounties/486add92-275e-4a7b-92f9-42d84bc759da
- pypi.org/project/lightning
- github.com/advisories/GHSA-cgwc-qvrx-rf7f
More pytorch-lightning advisories
All| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Sep 10 | pytorch-lightning vulnerable to Arbitrary File Write via /v1/runs API endpoint CVE-2024-5980Critical9.1fixed in 2.3.3 | Critical9.1 | 2.3.3 |
| Jul 15 | PyTorch Lightning through 2.6.5, fixed in commit d710d68, contains a remote code execution vulnerability in the _load_state function that imports and executes attacker-controlled module names from checkpoint _instantiator hyperparameters. Attackers can craft malicious checkpoint files that bypass we CVE-2026-58659High7.8fixed in 2.6.6 | High7.8 | 2.6.6 |
| May 12 | PyTorch Lightning load_from_checkpoint has an insecure checkpoint deserialization CVE-2026-31221High7.8no fix yet | High7.8 | No fix yet |
| May 7 | Compromise of PyTorch Lightning PyPi Package Versions CVE-2026-44484Critical9.8no fix yet | Critical9.8 | No fix yet |
| Mar 202025 | PyTorch Lightning denial of service vulnerability CVE-2024-8020High7.5no fix yet | High7.5 | No fix yet |
| Mar 202025 | PyTorch Lightning path traversal vulnerability CVE-2024-8019Critical9.1fixed in 2.4.0 | Critical9.1 | 2.4.0 |