# CVE-2024-5452: RCE via Property/Class Pollution in lightning-ai/pytorch-lightning

- Severity: Critical 9.8 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 4.30%, higher than 92% of CVEs (2026-11-30)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-06-06T17:54:57.559Z
- Modified: 2026-11-16T15:30:03.491Z
- Also known as: GHSA-cgwc-qvrx-rf7f, PYSEC-2026-385, PYSEC-2026-3974
- Weaknesses: CWE-913, CWE-915
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: @huntr_ai

## Description

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.

(As written by CVE List.)

## Affected

- lightning-ai lightning-ai/pytorch-lightning: from unspecified before 2.3.3
- lightning_ai lightning_ai\/pytorch_lightning: up to 2.2.1
- lightning (PyPI): before 2.3.3
- pytorch-lightning (PyPI): before 2.3.3
- lightningai pytorch_lightning: before 2.3.3

## Every score

- @huntr_ai: CVSS:3.0 9.8 Critical `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.0 9.8 Critical `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.0 9.8 Critical `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://huntr.com/bounties/486add92-275e-4a7b-92f9-42d84bc759da> (exploit, third-party-advisory, web)
- <https://github.com/lightning-ai/pytorch-lightning/commit/330af381de88cff17515418a341cbc1f9f127f9a> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-5452> (advisory)
- <https://github.com/Lightning-AI/pytorch-lightning/issues/20038> (web)
- <https://github.com/Lightning-AI/pytorch-lightning/releases/tag/2.3.3> (web)
- <https://github.com/advisories/GHSA-cgwc-qvrx-rf7f> (advisory)
- <https://github.com/lightning-ai/pytorch-lightning> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/lightning/PYSEC-2026-385.yaml> (web)
- <https://github.com/pypa/advisory-database/tree/main/vulns/pytorch-lightning/PYSEC-2026-3974.yaml> (web)
- <https://pypi.org/project/lightning> (package, web)

## Sources

- CVE List: [CVE-2024-5452](https://www.cve.org/CVERecord?id=CVE-2024-5452), CVE Terms of Use, modified 2025-10-15
- GitHub Advisory Database: [GHSA-cgwc-qvrx-rf7f](https://github.com/advisories/GHSA-cgwc-qvrx-rf7f), CC-BY-4.0, modified 2026-11-16
- NVD: [CVE-2024-5452](https://nvd.nist.gov/vuln/detail/CVE-2024-5452), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-385](https://osv.dev/vulnerability/PYSEC-2026-385), CC-BY-4.0, modified 2026-09-10
- PyPA Advisory Database: [PYSEC-2026-3974](https://osv.dev/vulnerability/PYSEC-2026-3974), CC-BY-4.0, modified 2026-09-10

---

Page: https://cve.day/CVE-2024-5452 · Whole record: https://cve.day/CVE-2024-5452.json · Rebuilt by cve.day 2026-11-25T22:58:41.494Z
