UTC
Critical

pytorch-lightning vulnerable to Arbitrary File Write via /v1/runs API endpoint

CVE-2024-5980 · GHSA-mr7h-w2qc-ffc2 · published 2024-06-27 · updated 2026-11-16

Severity
Critical
CVSS score
9.1
Chance of exploitation (EPSS)
1.3%
Fixed in
2.3.3
  • Exploitation Public proof of concept
  • Automatable Yes
  • Technical impact Partial
  • CISA SSVC
What it is

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

Upgrade lightning to 2.3.3 or later, and pytorch-lightning to 2.3.3 or later.

Affected
PackageRegistryAffectedFixed in
lightningPyPI< 2.3.32.3.3
pytorch-lightningPyPI< 2.3.32.3.3
Also in lightning, pytorch-lightning
  1. CriticalMalicious code in lightning (PyPI)lightning, lightning
  2. CriticalCompromise of PyTorch Lightning PyPi Package Versionspytorch-lightning, pytorch-lightning
  3. CriticalPyTorch Lightning path traversal vulnerabilitylightning, pytorch-lightning
  4. CriticalRemote code execution in pytorch lightninglightning, pytorch-lightning
  5. CriticalCode Injection in PyTorch Lightningpytorch-lightning
  6. HighPyTorch Lightning allows arbitrary code execution through checkpoint _instantiator hyperparameterslightning

The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.

Sources: GitHub Advisory Database, reviewed and malware advisories (CC BY 4.0, https://github.com/advisories); advisories published by Cursor (https://github.com/cursor/cursor/security/advisories); advisories published by OpenClaw (https://github.com/openclaw/openclaw/security/advisories); advisories published by vLLM (https://github.com/vllm-project/vllm/security/advisories); advisories published by Open WebUI (https://github.com/open-webui/open-webui/security/advisories); advisories published by n8n (https://github.com/n8n-io/n8n/security/advisories); advisories published by Flowise (https://github.com/FlowiseAI/Flowise/security/advisories); advisories published by Langflow (https://github.com/langflow-ai/langflow/security/advisories); advisories published by the MCP Python SDK project (https://github.com/modelcontextprotocol/python-sdk/security/advisories); advisories published by MLflow (https://github.com/mlflow/mlflow/security/advisories); CISA Known Exploited Vulnerabilities catalog (CC0). Data as of 2026-11-22. ShieldMap describes how each problem works and how to fix it; it does not publish exploit code. Report a correction to [email protected].