CRITICAL🇵🇱 Wersja polska

CVE-2024-5452

CVSS 9.8v3.1pub. 2024-06-06upd. 2025-10-15

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.

🤖 AI Analysis
How it works

The library uses `deepdiff.Delta` objects to modify application state based on actions from the frontend. The deserialization mechanism has a whitelist intended to restrict allowed operations; however, it is possible to bypass it by crafting a serialized delta object containing dunder attributes (e.g., `__class__`, `__module__`). The `deepdiff` library improperly manages such attributes, allowing an attacker to access other modules, classes, and object instances. As a result, arbitrary attribute writing and full RCE are possible, and the endpoint handling delta is enabled by default in every installation.

Impact

An attacker can remotely execute arbitrary code on the server without any authentication, leading to complete takeover of the application — loss of confidentiality, integrity, and system availability.

Mitigation & patch

A patch available in the vendor's repository should be applied (commit 330af381de88cff17515418a341cbc1f9f127f9a on GitHub). Until an update is applied, it is recommended to disable or restrict network access to the delta endpoint (e.g., through a firewall or reverse proxy configuration).

Who is affected

lightning-ai/pytorch-lightning version 2.2.1 — all self-hosted applications in default configuration (delta endpoint enabled by default)

Analysis generated by Claude AI (Anthropic) based on NVD data. Always verify with vendor.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Lightningai Pytorch Lightning

    APP
    Lightningai
    < 2.3.3
🔵
CHECK WITH VENDOR
No clear patch data available. Check vendor references.
Tags
RCEDeserialization
CWE
References

Related vulnerabilities

CVE-2026-44484CRITICAL9.3PL ✓ten sam produkt

PyTorch Lightning – mechanizm harvesting poświadczeń (Embedded Malicious Code)

CVE-2024-8019CRITICAL9.1PL ✓ten sam produkt

RCE przez upload pliku w PyTorch Lightning (Windows) – CVE-2024-8019

CVE-2024-5980CRITICAL9.8PL ✓ten sam produkt

Path Traversal w PyTorch Lightning umożliwiający RCE przez złośliwy plugin

CVE-2022-0845CRITICAL9.8ten sam produkt

Code Injection in GitHub repository pytorchlightning/pytorch-lightning prior to 1.6.0.

CVE-2026-31221HIGH7.8ten sam produkt

PyTorch-Lightning versions 2.6.0 and earlier contain an insecure deserialization vulnerability (CWE-502) in th...