LIGHTNING · CVE-2024-5452 · Package
FIX → 2.3.3
PyTorch Lightning deserializes user-supplied deepdiff Delta objects sent to a frontend endpoint, and dunder attributes can slip past its whitelist. A remote attacker can write arbitrary attributes and execute code on the server.
first public Jun 6, 2024 · 1 public exploit · 2 sources
Check it with your coding agent
It reads this page and tells you if your code or app is affected.
Self-hosted PyTorch Lightning applications running a version below 2.3.3 with the delta endpoint reachable from the network. The delta endpoint is enabled by default, so default configurations are exposed. Teams that only use Lightning for offline training scripts with no network-facing app can skip it.
Not affected if delta-endpoint-disabled, offline-training-only
Who cares deepdiff, python, pytorch-lightning, self-hosted
pip show lightning pytorch-lightning and compare the version against 2.3.3Upgrade to 2.3.3
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.
Are you affected?
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
InfraStack checks it against your stack and answers on your report, with the evidence and the fix.
lightning and pytorch-lightning: upgrade to 2.3.3GitHub Advisory Database, CC-BY 4.0 · NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.