PYTORCH-LIGHTNING · CVE-2024-8019 · Package
FIX → 2.4.0
PyTorch Lightning's LightningApp upload endpoint (/api/v1/upload_file/) accepts a crafted filename on Windows hosts and writes files outside the intended directory. An attacker can overwrite critical files or plant malicious ones, which can lead to remote code execution.
first public Mar 20, 2025 · 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.
Teams running LightningApp from pytorch-lightning or lightning older than 2.4.0 on Windows hosts, where the upload endpoint is reachable. The sources describe the issue for version 2.3.2 on Windows; Linux and macOS are not mentioned. Projects that do not run LightningApp or that are on 2.4.0 or later are not affected.
Not affected if fixed-version-2.4.0, no-lightningapp, non-windows-host
Who cares lightning, ml-training, python, pytorch-lightning, windows
pip show pytorch-lightning and pip show lightning; versions below 2.4.0 are affected./api/v1/upload_file/ endpoint.In lightning-ai/pytorch-lightning version 2.3.2, a vulnerability exists in the LightningApp when running on a Windows host. The vulnerability occurs at the /api/v1/upload_file/ endpoint, allowing an attacker to write or overwrite arbitrary files by providing a crafted filename. This can lead to potential remote code execution (RCE) by overwriting critical files or placing malicious files in sensitive locations.
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.
Upgrade to 2.4.0
pytorch-lightning and lightning: upgrade to 2.4.0.GitHub Advisory Database, CC-BY 4.0 · NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.