CVE-2024-8020 Denial of Service in lightning-ai/pytorch-lightning
An attacker can cause a denial of service by sending unexpected POST requests to the LightningApp state endpoint, crashing the server.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2024-8020?
CVE-2024-8020 is a high-severity denial of service vulnerability in lightning-ai/pytorch-lightning, published on 20 Mar 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-248
Which versions are affected by CVE-2024-8020?
4 open source packages ship an affected version, including pytorch-lightning and lightning. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
pytorch-lightning PyPI | All versions to 2.3.2 | None |
pytorch-lightning PyPI | All versions to 2.3.2 | None |
pytorch-lightning PyPI | All versions to 2.3.2 | None |
lightning PyPI | All versions to 2.3.2 | None |
Products include Lightningai Pytorch Lightning.
How do I fix CVE-2024-8020?
No fix has been published for CVE-2024-8020 yet. Limit exposure of the affected software until one is available.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2024-8020 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-8020 exists.
Other vulnerabilities in lightning-ai/pytorch-lightning
- CVE-2024-5452 RCE via Property/Class Pollution in lightning-ai/pytorch-lightning
- CVE-2026-44484 Compromise of PyTorch Lightning PyPi Package Versions
- CVE-2024-8019 Arbitrary File Write/Overwrite in lightning-ai/pytorch-lightning
- CVE-2024-5980 Arbitrary File Write via /v1/runs API endpoint in lightning-ai/pytorch-lightning
- CVE-2026-31221 PyTorch Lightning load_from_checkpoint has an insecure checkpoint deserialization
Sources
Also known as GHSA-98fp-7v67-4v3q, PYSEC-2026-1857, PYSEC-2026-3971.