Critical severity · published Jun 6, 2024
CVE-2024-5452
RCE via Property/Class Pollution in lightning-ai/pytorch-lightning
9.8
CVSS
26.8%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)26.8% · higher than 98% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
LI
lightning-ai/pytorch-lightning · lightning-ai
before 2.3.3 · source: vendor
PL
Pytorch Lightning · Lightningai
before 2.3.3 · source: NVD
LA
Lightning Ai\/pytorch Lightning · Lightning AI
through 2.2.1 · source: CISA
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2024-5452
CVE.org
https://www.cve.org/CVERecord?id=CVE-2024-5452
github.com
https://github.com/lightning-ai/pytorch-lightning/commit/330af381de88cff17515418a341cbc1f9f127f9a
Exploit
https://huntr.com/bounties/486add92-275e-4a7b-92f9-42d84bc759da
More from lightning-ai/pytorch-lightning
9.8
CVE-2024-5980
Arbitrary File Write via /v1/runs API endpoint in lightning-ai/pytorch-lightning
9.1
CVE-2024-8019
Arbitrary File Write/Overwrite in lightning-ai/pytorch-lightning
7.5
CVE-2024-8020
Denial of Service in lightning-ai/pytorch-lightning
