# CVE-2024-5980: Arbitrary File Write via /v1/runs API endpoint 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.32%, higher than 71% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-06-27T18:46:39.213Z
- Modified: 2026-11-16T15:00:09.767Z
- Also known as: GHSA-mr7h-w2qc-ffc2, PYSEC-2026-386, PYSEC-2026-3975
- Weaknesses: CWE-22, CWE-434
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: @huntr_ai

## Description

A vulnerability in the /v1/runs API endpoint of lightning-ai/pytorch-lightning v2.2.4 allows attackers to exploit path traversal when extracting tar.gz files. When the LightningApp is running with the plugin_server, attackers can deploy malicious tar.gz plugins that embed arbitrary files with path traversal vulnerabilities. This can result in arbitrary files being written to any directory in the victim's local file system, potentially leading to remote code execution.

(As written by CVE List.)

## Affected

- lightning-ai lightning-ai/pytorch-lightning: from unspecified before 2.3.3
- lightning_ai lightning_ai\/pytorch_lightning: up to *
- lightning (PyPI): before 2.3.3
- pytorch-lightning (PyPI): before 2.3.3
- lightningai pytorch_lightning: from 2.2.4 before 2.3.3

## 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.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/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/55a6ac6f-89c7-42ea-86f3-c6e93a2679f3> (exploit, third-party-advisory, web)
- <https://github.com/lightning-ai/pytorch-lightning/commit/330af381de88cff17515418a341cbc1f9f127f9a> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-5980> (advisory)
- <https://github.com/Lightning-AI/pytorch-lightning/pull/20039> (web)
- <https://github.com/Lightning-AI/pytorch-lightning/releases/tag/2.3.3> (web)
- <https://github.com/lightning-ai/pytorch-lightning> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/lightning/PYSEC-2026-386.yaml> (web)
- <https://github.com/pypa/advisory-database/tree/main/vulns/pytorch-lightning/PYSEC-2026-3975.yaml> (web)
- <https://pypi.org/project/lightning> (package, web)
- <https://github.com/advisories/GHSA-mr7h-w2qc-ffc2> (advisory)

## Sources

- CVE List: [CVE-2024-5980](https://www.cve.org/CVERecord?id=CVE-2024-5980), CVE Terms of Use, modified 2025-10-21
- GitHub Advisory Database: [GHSA-mr7h-w2qc-ffc2](https://github.com/advisories/GHSA-mr7h-w2qc-ffc2), CC-BY-4.0, modified 2026-11-16
- NVD: [CVE-2024-5980](https://nvd.nist.gov/vuln/detail/CVE-2024-5980), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-386](https://osv.dev/vulnerability/PYSEC-2026-386), CC-BY-4.0, modified 2026-09-10
- PyPA Advisory Database: [PYSEC-2026-3975](https://osv.dev/vulnerability/PYSEC-2026-3975), CC-BY-4.0, modified 2026-09-10

---

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