Vulnerability · Published Jun 6, 2024 · Assigned by @huntr_ai

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

Critical 9.8

In plain English

A critical-severity security flaw in lightning-ai/pytorch-lightning from lightning-ai. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 26.8% (higher than 98% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.0)9.8Critical
Exploit odds (30 days)26.8%top 2.0% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack tooling1Public PoC

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
PyPIlightning2.3.3GHSA-cgwc-qvrx-rf7f
PyPIlightning2.3.3PYSEC-2026-385
PyPIpytorch-lightning2.3.3PYSEC-2026-3974

Affected products (as reported)

VendorProductVersions
lightning-ai lightning-ai/pytorch-lightning unspecified – before 2.3.3

Weakness: CWE-915 · Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

References