Vulnerability · Published Mar 20, 2025 · Assigned by @huntr_ai
CVE-2024-8019Arbitrary File Write/Overwrite in lightning-ai/pytorch-lightning
Critical 9.1
In plain English
A critical-severity unrestricted file upload in lightning-ai/pytorch-lightning from lightning-ai. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 1.1% (higher than 66% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | lightning | 2.4.0 | PYSEC-2026-3970 |
| PyPI | pytorch-lightning | 2.4.0 | GHSA-4cv3-v7pv-rfhf |
| PyPI | pytorch-lightning | 2.4.0 | PYSEC-2026-507 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| lightning-ai | lightning-ai/pytorch-lightning | unspecified – before 2.3.3 |
Weakness: CWE-434 · Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H