CVE-2024-8020: lightning-ai/pytorch-lightning · Uncaught Exception
Affects lightning-ai/pytorch-lightningSource CVE Database V5
Not known to be exploited · CVSS 7.5 High.
Data as of 26 Oct 2026, 07:57 UTC
- EPSS
- 0.6% chance of exploitation in 30 days – higher than 50% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HExploitation evidence
Disclosed: evidence found.
CVE published 20 Mar 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-26.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
PyPIpytorch-lightningpkg:pypi/pytorch-lightningOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
1. Monitor lightning-ai/pytorch-lightning official channels for patches addressing CVE-2024-8020 and apply them promptly once available. 2. Implement network-level filtering to restrict access to the /api/v1/state endpoint, allowing only trusted IP addresses or internal network segments to communicate with LightningApp. 3. Deploy Web Application Firewalls (WAFs) or API gateways with rules to detect and block malformed or unexpected POST requests targeting the vulnerable endpoint. 4. Enhance input validation within the application layer to ensure that only expected state values are processed, preventing uncaught exceptions. 5. Conduct regular security testing, including fuzzing and exception handling verification, to identify similar vulnerabilities proactively. 6. Isolate AI/ML infrastructure in segmented network zones to limit exposure to external threats. 7. Establish monitoring and alerting for abnormal server shutdowns or crashes related to LightningApp services. 8. Educate development and operations teams on secure coding practices, emphasizing exception handling and input sanitization in AI frameworks. 9. Consider temporary disabling or restricting access to the vulnerable API endpoint if patching is delayed and risk is high. 10. Maintain incident response plans tailored to AI infrastructure to quickly address potential denial of service events.
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.