CVE-2024-8020: Pytorch lightning Denial of Service Vulnerability
HIGHCVE-2024-8020 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-248: Uncaught Exception) affecting Pytorch lightning libraries in the PyPI ecosystem. The issue involves pytorch lightning denial of service vulnerability. Remediation is available in the latest vendor maintenance releases.
CVE-2024-8020 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2024-8020
To remediate this vulnerability, upgrade all affected Pytorch lightning dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install pytorch-lightning>=Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show pytorch-lightning
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2024-8020, inspect your installed packages using pip:
pip show pytorch-lightning
Analyze the terminal output to locate any version of Pytorch lightning in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The pip show pytorch-lightning command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-248: Uncaught Exception, where an exception is thrown from a function, but it is not caught. In Pytorch lightning, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-8020 Affected Pytorch lightning Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pytorch-lightning
|
PyPI |
≤ 2.3.2
|
|
References
Frequently Asked Questions
What is CVE-2024-8020?
Which Pytorch lightning versions are affected?
What version fixes CVE-2024-8020?
Is pytorch-lightning affected?
What is the CVSS score of CVE-2024-8020?
What CWE is associated with CVE-2024-8020?
How can I check PyPI dependencies for CVE-2024-8020?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-98fp-7v67-4v3q",
"modified" : "2025-03-21T21:56:43Z",
"published" : "2025-03-20T12:32:47Z",
"aliases" : [ "CVE-2024-8020" ],
"summary" : "PyTorch Lightning denial of service vulnerability",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pytorch-lightning"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "2.3.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-8020"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Lightning-AI/pytorch-lightning"
}, {
"type" : "WEB",
"url" : "https://huntr.com/bounties/8b642a78-2b80-4fb0-9b2f-8ba0ff37db6a"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-248" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-03-21T21:56:43Z",
"nvd_published_at" : "2025-03-20T10:15:39Z"
}
}