Security Digest · Vulnerability record

CVE-2024-5980: pytorch-lightning vulnerable to Arbitrary File Write via /v1/runs API endpoint

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.

CVSS 9.1 Critical EPSS 1.3% · p71

Should you act?

Critical and remotely reachable

No known exploitation yet, but it is network-reachable without credentials. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.

  • Not in CISA KEV, but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
  • EPSS 1.3%, percentile 71: FIRST’s model estimates a 1.3% chance of exploitation activity in the next 30 days, higher than 71% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
  • Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
  • Only applies if your dependency tree includes lightning (PyPI) <= 2.3.1, fixed in 2.3.3. Check your lockfile, including transitive dependencies.

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 pluginserver, 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.

From the GitHub advisory

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 pluginserver, 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.

Weakness type: CWE-22, CWE-434.

Product: lightning (PyPI) · Assigned by: @huntr_ai · Published: 2024-06-27

Affected and fixed versions

EcosystemPackageVulnerableFirst fixed
PyPIlightning<= 2.3.12.3.3
VendorProductAffected versions (per CVE record)
lightning-ailightning-ai/pytorch-lightningunspecified < 2.3.3

Severity scores

Scored byCVSSScoreVector
@huntr_ai3.09.1 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
GitHub3.19.1 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
  • Attack vector: network (remotely reachable)
  • Attack complexity: low
  • Privileges required: none (no login)
  • User interaction: none
  • Scope: unchanged

CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.

Exploitation and urgency

  • CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
  • CISA SSVC assessment: exploitation poc, automatable yes, technical impact partial.
  • FIRST EPSS (model of 2026-10-21): 1.32% probability of exploitation activity in the next 30 days; percentile 71.

Timeline

  • — CVE record published by @huntr_ai
  • — GitHub-reviewed advisory GHSA-mr7h-w2qc-ffc2 published (critical)
  • — CVE record last updated

Sources and references

Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.

Vulnerability records

  1. GitHub Advisory GHSA-mr7h-w2qc-ffc2 github.com
  2. CVE.org record CVE-2024-5980 cve.org
  3. NVD entry CVE-2024-5980 nvd.nist.gov

Other references from the CVE record and advisory

  1. huntr.com huntr.com
  2. github.com github.com
  3. github.com github.com
  4. github.com github.com

Critical PyPI advisories · Today’s Security Digest