PYSEC-2026-385

    Dashboard / Vulnerabilities / PYSEC-2026-385

    PYSEC-2026-385

    Published: 29 Jun 2026Last Modified: 10 Sept 2026

    Summary: Remote code execution in pytorch lightning

    Details: 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

    Package

    Name: lightning

    Purl: pkg:pypi/lightning

    Affected ranges

    Type: ECOSYSTEM

    Events:

    Introduced- 0
    Fixed -2.3.3

    Affected versions

    1.8.0
    1.8.0.post1
    1.8.0rc1
    1.8.0rc2
    1.8.1
    1.8.2
    1.8.3
    1.8.3.post0
    1.8.3.post1
    1.8.3.post2
    1.8.4
    1.8.4.post0
    1.8.5
    1.8.5.post0
    1.8.6

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High