# CVE-2024-8019: Arbitrary File Write/Overwrite in lightning-ai/pytorch-lightning

- Severity: Critical 9.1 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.12%, higher than 67% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-03-20T10:08:48.918Z
- Modified: 2026-11-16T16:30:03.539Z
- Also known as: GHSA-4cv3-v7pv-rfhf, PYSEC-2026-3970, PYSEC-2026-507
- Weaknesses: CWE-434
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: @huntr_ai

## 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.

(As written by CVE List.)

## Affected

- lightning-ai lightning-ai/pytorch-lightning: from unspecified before 2.3.3
- pytorch-lightning (PyPI): before 2.4.0
- lightning (PyPI): before 2.4.0
- lightningai pytorch_lightning: 2.3.2

## Every score

- @huntr_ai: CVSS:3.0 9.1 Critical `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H`
- GitHub: CVSS:3.0 9.1 Critical `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H`
- NVD: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H`
- PyPA Advisory Database: CVSS:3.0 9.1 Critical `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H`

## References

- <https://huntr.com/bounties/2754298b-5af5-48ef-8b38-999093ddf2bd> (exploit, third-party-advisory, web)
- <https://github.com/lightning-ai/pytorch-lightning/commit/330af381de88cff17515418a341cbc1f9f127f9a> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-8019> (advisory)
- <https://github.com/pypa/advisory-database/tree/main/vulns/lightning/PYSEC-2026-3970.yaml> (web)
- <https://github.com/pypa/advisory-database/tree/main/vulns/pytorch-lightning/PYSEC-2026-507.yaml> (web)
- <https://github.com/pytorch/pytorch> (package)
- <https://pypi.org/project/pytorch-lightning> (package, web)
- <https://github.com/advisories/GHSA-4cv3-v7pv-rfhf> (advisory)

## Sources

- CVE List: [CVE-2024-8019](https://www.cve.org/CVERecord?id=CVE-2024-8019), CVE Terms of Use, modified 2025-03-20
- GitHub Advisory Database: [GHSA-4cv3-v7pv-rfhf](https://github.com/advisories/GHSA-4cv3-v7pv-rfhf), CC-BY-4.0, modified 2026-11-16
- NVD: [CVE-2024-8019](https://nvd.nist.gov/vuln/detail/CVE-2024-8019), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-3970](https://osv.dev/vulnerability/PYSEC-2026-3970), CC-BY-4.0, modified 2026-09-10
- PyPA Advisory Database: [PYSEC-2026-507](https://osv.dev/vulnerability/PYSEC-2026-507), CC-BY-4.0, modified 2026-09-10

---

Page: https://cve.day/CVE-2024-8019 · Whole record: https://cve.day/CVE-2024-8019.json · Rebuilt by cve.day 2026-11-25T22:58:52.387Z
