PyTorch Lightning path traversal vulnerability
Date: 2025-03
Affected: pip/pytorch-lightning
Attack vector: rce
Category: vulnerability-disclosure
Severity: Critical
CVE: CVE-2024-5452
CVE-2024-5980
CVE-2024-8019
CWE: CWE-22
CWE-434
CWE-913
CWE-915
CVSS: 9.1 (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H)

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.


Mitigations:

Architectural layers (MAESTRO):