---
title: "CVE-2024-5452: Remote code execution in pytorch lightning"
url: https://erroneo.us/security/cve/CVE-2024-5452/
description: "CVE-2024-5452 (lightning (PyPI)): A remote code execution (RCE) vulnerability exists in the lightning-ai/pytorch-lightning library version 2.2.1 due to…"
type: vulnerability-record
section: "Security Digest"
date_published: 2024-06-06
date_modified: 2025-10-15
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2024-5452"
kev: false
cvss: 9.8
epss: 0.26831
license: All rights reserved. Quote with attribution and a link.
---

# CVE-2024-5452: Remote code execution in pytorch lightning

**Signal:** High exploit likelihood. EPSS ranks it in the top 5% of all CVEs for likely exploitation in the next 30 days. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

- Not in CISA KEV , but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
- EPSS 26.8% , percentile 98: FIRST’s model estimates a 26.8% chance of exploitation activity in the next 30 days, higher than 98% of all scored CVEs (very high). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes lightning (PyPI) < 2.3.3, fixed in 2.3.3 . Check your lockfile, including transitive dependencies.

## What it is

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.

## Affected packages

- PyPI `lightning` < 2.3.3 → fixed: 2.3.3

## Affected products (CVE record)

- lightning-ai lightning-ai/pytorch-lightning: unspecified < 2.3.3

## Severity

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

## Exploitation

- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation poc , automatable yes , technical impact total .
- FIRST EPSS (model of 2026-10-21): 26.83% probability of exploitation activity in the next 30 days; percentile 98.

## Sources

- [GitHub Advisory GHSA-cgwc-qvrx-rf7f](https://github.com/advisories/GHSA-cgwc-qvrx-rf7f)
- [CVE.org record CVE-2024-5452](https://www.cve.org/CVERecord?id=CVE-2024-5452)
- [NVD entry CVE-2024-5452](https://nvd.nist.gov/vuln/detail/CVE-2024-5452)
- [huntr.com](https://huntr.com/bounties/486add92-275e-4a7b-92f9-42d84bc759da)
- [github.com](https://github.com/lightning-ai/pytorch-lightning/commit/330af381de88cff17515418a341cbc1f9f127f9a)
- [github.com](https://github.com/Lightning-AI/pytorch-lightning/releases/tag/2.3.3)
- [github.com](https://github.com/Lightning-AI/pytorch-lightning/issues/20038)

---
Source page: https://erroneo.us/security/cve/CVE-2024-5452/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
