Skip to content
Heist/ feed
Back to feed
Critical

RCE via Property/Class Pollution in lightning-ai/pytorch-lightning

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-5452
Confirmed fixed CVEs
Not specified
Updated in this feed
6 Nov 2026, 02:04 UTC · Revision 1

Source evidence

RCE via Property/Class Pollution in lightning-ai/pytorch-lightning

core-osv · Original source

Published 6 Jun 2024, 17:54 UTC

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.

osv:CVE-2024-5452
Complete source record
{
  "id": "910d4923b65df22efc220737565d50dbacef69bf2432affe0c8734a239109cd3",
  "url": "https://osv.dev/vulnerability/CVE-2024-5452",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "RCE via Property/Class Pollution in lightning-ai/pytorch-lightning",
    "summary": "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.",
    "evidence": "osv:CVE-2024-5452",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2024-5452",
      "aliases": [
        "CVE-2024-5452",
        "GHSA-cgwc-qvrx-rf7f",
        "PYSEC-2026-385",
        "PYSEC-2026-3974"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/lightning-ai/pytorch-lightning",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "cf348673eda662cc2e9aa71a72a19b8774f85718"
                },
                {
                  "fixed": "330af381de88cff17515418a341cbc1f9f127f9a"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:lightningai:pytorch_lightning:*:*:*:*:*:python:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.3.3"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "330af381de88cff17515418a341cbc1f9f127f9a"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "2.3.2",
            "2.3.1",
            "2.3.0",
            "2.2.0",
            "2.2.0.rc0",
            "2.1.0",
            "2.1.0.rc1",
            "2.1.0.rc0",
            "2.0.0",
            "2.0.0rc0",
            "1.9.0",
            "1.9.0rc0",
            "1.8.0",
            "1.8.0rc2",
            "1.8.0rc1",
            "1.8.0rc0",
            "app/0.6.0rc0",
            "1.7.0",
            "1.7.0rc1",
            "1.7.0rc0",
            "1.6.0",
            "1.6.0rc1",
            "1.6.0rc0",
            "1.5.0",
            "1.5.0rc1",
            "1.5.0rc0",
            "1.4.0",
            "1.4.0rc2",
            "1.4.0rc1",
            "1.4.0rc0",
            "1.3.0",
            "1.3.0rc3",
            "1.3.0rc2",
            "1.3.0rc1",
            "1.3.0rc0",
            "1.2.0",
            "1.2.0rc2",
            "1.2.0rc1",
            "1.1.0",
            "1.1.0rc2",
            "1.1.0rc1",
            "1.0.4",
            "1.0.3",
            "1.0.2",
            "1.0.1",
            "1.0.0",
            "0.10.0",
            "0.9.0",
            "0.8.5",
            "0.8.4",
            "0.8.3",
            "0.8.2",
            "0.8.1",
            "0.8.0",
            "0.7.6",
            "0.7.5",
            "0.7.4",
            "0.7.3",
            "0.7.2",
            "0.7.1",
            "0.7.0",
            "0.6.0",
            "0.5.2.1",
            "0.5.2",
            "0.5.1",
            "0.5.0",
            "0.4.9",
            "0.4.7",
            "0.4.6",
            "0.4.5",
            "0.4.4",
            "0.4.3",
            "0.4.2",
            "0.4.1",
            "0.4.0",
            "0.2.1",
            "0.2",
            "0.1.2",
            "0.1.1",
            "0.0.2",
            "0.0.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-5452.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:45.961197029Z",
      "provider": "osv",
      "references": [
        "https://huntr.com/bounties/486add92-275e-4a7b-92f9-42d84bc759da",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/5xxx/CVE-2024-5452.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-5452",
        "https://github.com/lightning-ai/pytorch-lightning/commit/330af381de88cff17515418a341cbc1f9f127f9a"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-915"
        ],
        "cna_assigner": "@huntr_ai",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/5xxx/CVE-2024-5452.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-5452",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 514110,
  "published_at": "2024-06-06T17:54:57.559+00:00"
}