CVE-2024-8020 Denial of Service in lightning-ai/pytorch-lightning

High 7.5 Published Updated

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.

PackageAffectedFixed in
pytorch-lightning PyPIAll versions to 2.3.2None
pytorch-lightning PyPIAll versions to 2.3.2None
pytorch-lightning PyPIAll versions to 2.3.2None
lightning PyPIAll versions to 2.3.2None

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.

Sources

Also known as GHSA-98fp-7v67-4v3q, PYSEC-2026-1857, PYSEC-2026-3971.

Is CVE-2024-8020 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free