CVE-2024-8020: pytorch-lightning: unauthenticated DoS crashes LightningApp
GHSA-98fp-7v67-4v3q HIGH CISA: TRACK*Any LightningApp instance with `/api/v1/state` reachable from the network can be crashed with a single unauthenticated POST request — no exploit kit required. No patch exists for v2.3.2; immediate mitigation is network-level access control on this endpoint. If your ML teams run LightningApp in shared or cloud environments, treat this as a production availability risk today.
Risk Assessment
Despite a 7.5 CVSS score, the EPSS of 0.00064 suggests minimal active exploitation. However, the attack profile is maximally accessible: network-reachable, zero authentication, zero user interaction, zero complexity. The blast radius is scoped to availability (A:H, C:N, I:N), so confidentiality and integrity are intact. Risk is HIGH for orgs running externally or cloud-exposed LightningApp servers; LOW for air-gapped or developer-only deployments.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| pytorch-lightning | pip | <= 2.3.2 | No patch |
Do you use pytorch-lightning? You're affected.
Severity & Risk
Attack Surface
Recommended Action
6 steps-
IMMEDIATE
Block external access to
/api/v1/stateat the network perimeter or reverse proxy (nginx/Traefik deny rules). -
NETWORK SEGMENTATION
Ensure LightningApp servers are not internet-facing unless strictly required; bind to localhost or internal VPCs only.
-
WAF RULE
Add a rule to reject POST requests to
/api/v1/statefrom untrusted sources or with unexpected content-type/body structure. -
MONITORING
Alert on HTTP 500 responses or sudden process restarts on LightningApp services — these may indicate active exploitation attempts.
-
UPGRADE PATH
No official patch exists as of CVE publish date; monitor lightning-ai/pytorch-lightning releases for a fix and upgrade immediately when available.
-
COMPENSATING CONTROL
Add a reverse proxy with request validation (e.g., schema enforcement) in front of LightningApp if the endpoint must remain accessible.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2024-8020?
Any LightningApp instance with `/api/v1/state` reachable from the network can be crashed with a single unauthenticated POST request — no exploit kit required. No patch exists for v2.3.2; immediate mitigation is network-level access control on this endpoint. If your ML teams run LightningApp in shared or cloud environments, treat this as a production availability risk today.
Is CVE-2024-8020 actively exploited?
No confirmed active exploitation of CVE-2024-8020 has been reported, but organizations should still patch proactively.
How to fix CVE-2024-8020?
1. IMMEDIATE: Block external access to `/api/v1/state` at the network perimeter or reverse proxy (nginx/Traefik deny rules). 2. NETWORK SEGMENTATION: Ensure LightningApp servers are not internet-facing unless strictly required; bind to localhost or internal VPCs only. 3. WAF RULE: Add a rule to reject POST requests to `/api/v1/state` from untrusted sources or with unexpected content-type/body structure. 4. MONITORING: Alert on HTTP 500 responses or sudden process restarts on LightningApp services — these may indicate active exploitation attempts. 5. UPGRADE PATH: No official patch exists as of CVE publish date; monitor lightning-ai/pytorch-lightning releases for a fix and upgrade immediately when available. 6. COMPENSATING CONTROL: Add a reverse proxy with request validation (e.g., schema enforcement) in front of LightningApp if the endpoint must remain accessible.
What systems are affected by CVE-2024-8020?
This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, ml experiment tracking, interactive ml applications.
What is the CVSS score for CVE-2024-8020?
CVE-2024-8020 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.12%.
Technical Details
NVD Description
A vulnerability in lightning-ai/pytorch-lightning version 2.3.2 allows an attacker to cause a denial of service by sending an unexpected POST request to the `/api/v1/state` endpoint of `LightningApp`. This issue occurs due to improper handling of unexpected state values, which results in the server shutting down.
Exploitation Scenario
An adversary scans for exposed LightningApp instances via Shodan or direct network enumeration (port 7501 is the default). They send a single malformed POST to `http://<target>:7501/api/v1/state` with an unexpected JSON payload that triggers an unhandled state transition. The server throws an uncaught exception and shuts down immediately. In a shared ML platform — e.g., a team running concurrent training jobs or a CISO demo environment — this causes a complete outage. In a CI/CD context, automated pipelines depending on LightningApp state APIs fail silently, potentially corrupting in-flight experiment tracking.
Weaknesses (CWE)
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H References
Timeline
Related Vulnerabilities
CVE-2022-0845 9.8 pytorch-lightning: code injection enables full RCE
Same package: pytorch-lightning CVE-2024-8019 9.1 pytorch-lightning: file upload RCE (Windows)
Same package: pytorch-lightning CVE-2026-44484 pytorch-lightning: supply chain, credential harvesting
Same package: pytorch-lightning CVE-2026-33660 10.0 TensorFlow: type confusion NPD in tensor conversion
Same attack type: DoS CVE-2022-35939 9.8 TensorFlow: ScatterNd OOB write enables RCE/crash
Same attack type: DoS
AI Threat Alert