CVE-2024-8020: pytorch-lightning: unauthenticated DoS crashes LightningApp
GHSA-98fp-7v67-4v3qHIGHCISA: 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.
What is the risk?
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.
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| PyTorch Lightning | pip | <= 2.3.2 | No patch |
Do you use PyTorch Lightning? You're affected.
How severe is it?
What is the attack surface?
What should I do?
6 stepsIMMEDIATE
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.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
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.64%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0006Active ScanningAML.T0029Denial of AI ServiceAML.T0049Exploit Public-Facing ApplicationCompliance Controls Affected
What are the technical details?
Original Advisory
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)
CWE-248 — Uncaught Exception: An exception is thrown from a function, but it is not caught.
- [Requirements] The choice between a language which has named or unnamed exceptions needs to be done. While unnamed exceptions exacerbate the chance of not properly dealing with an exception, named exceptions suffer from the up call version of the weak base class problem.
- [Requirements] A language can be used which requires, at compile time, to catch all serious exceptions. However, one must make sure to use the most current version of the API as new exceptions could be added.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
Timeline
Related Vulnerabilities
CVE-2024-54529.8pytorch-lightning: RCE via deepdiff Delta deserialization
Same package: pytorch-lightningCVE-2022-08459.8pytorch-lightning: code injection enables full RCE
Same package: pytorch-lightningCVE-2024-80199.1pytorch-lightning: file upload RCE (Windows)
Same package: pytorch-lightningCVE-2026-247478.8pytorch: Code Injection enables RCE
Same package: pytorch-lightningCVE-2026-312217.8pytorch-lightning: RCE via insecure checkpoint deserialization
Same package: pytorch-lightning