Security Digest · Vulnerability record
CVE-2024-5452: 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.
CVSS 9.8 Critical EPSS 26.8% · p98
Should you act?
High exploit likelihood
EPSS ranks it in the top 5% of all CVEs for likely exploitation in the next 30 days. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.
- 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.
From the GitHub advisory
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.
Weakness type: CWE-915, CWE-913.
Product: lightning (PyPI) · Assigned by: @huntr_ai · Published: 2024-06-06
Affected and fixed versions
| Ecosystem | Package | Vulnerable | First fixed |
|---|---|---|---|
| PyPI | lightning | < 2.3.3 | 2.3.3 |
| Vendor | Product | Affected versions (per CVE record) |
|---|---|---|
| lightning-ai | lightning-ai/pytorch-lightning | unspecified < 2.3.3 |
Severity scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| @huntr_ai | 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 | 3.1 | 9.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
- Attack vector: network (remotely reachable)
- Attack complexity: low
- Privileges required: none (no login)
- User interaction: none
- Scope: unchanged
CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.
Exploitation and urgency
- 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.
Timeline
- — CVE record published by @huntr_ai
- — GitHub-reviewed advisory GHSA-cgwc-qvrx-rf7f published (critical)
- — CVE record last updated
Sources and references
Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.
Vulnerability records
- GitHub Advisory GHSA-cgwc-qvrx-rf7f github.com
- CVE.org record CVE-2024-5452 cve.org
- NVD entry CVE-2024-5452 nvd.nist.gov
Other references from the CVE record and advisory
- huntr.com huntr.com
- github.com github.com
- github.com github.com
- github.com github.com