CVE-2024-52581
Litestar allows unbounded resource consumption (DoS vulnerability)
Also known as GHSA-gjcc-jvgw-wvwj, PYSEC-2024-178, PYSEC-2026-1944
Mitigation
- Upgrade litestar to 2.13.0 or later.
Who should check
- Projects that depend on PyPI package litestar (< 2.13.0)
- Projects that depend on PyPI package starlite (<= 1.51.16)
- Anyone running litestar-org litestar < 2.13.0
Vulnerability facts
- Affected
- litestar < 2.13.0; starlite <= 1.51.16
- Fixed in
- 2.13.0
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 8.2 (v4.0, CNA)CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:LOpen in CVSS calculator
Show all 11 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Attack requirements: Present
- Privileges required: None
- User interaction: None
- Confidentiality impact: None
- Integrity impact: None
- Availability impact: High
- Confidentiality impact on other systems: None
- Integrity impact on other systems: None
- Availability impact on other systems: Low
- EPSS
- 1.21% chance of exploitation in 30 days (percentile 68, 2026-11-26)
- CWE
- CWE-770
- Modified
Description
Litestar is an Asynchronous Server Gateway Interface (ASGI) framework. Prior to version 2.13.0, the multipart form parser shipped with litestar expects the entire request body as a single byte string and there is no default limit for the total size of the request body. This allows an attacker to upload arbitrary large files wrapped in a `multipart/form-data` request and cause excessive memory consumption on the server. The multipart form parser in affected versions is vulnerable to this type of attack by design. The public method signature as well as its implementation both expect the entire request body to be available as a single byte string. It is not possible to accept large file uploads in a safe way using this parser. This may be a regression, as a variation of this issue was already reported in CVE-2023-25578. Limiting the part number is not sufficient to prevent out-of-memory errors on the server. A patch is available in version 2.13.0.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| PyPI litestar | < 2.13.0 | 2.13.0 | osv |
| PyPI starlite | <= 1.51.16 | — | osv |
| litestar-org litestar | < 2.13.0 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2024-52581. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2024-52581.md Affected: litestar < 2.13.0; starlite <= 1.51.16 Fixed in: 2.13.0 Steps: 1. Search this machine and project for litestar (PyPI), starlite (PyPI), litestar-org litestar: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2024-52581 being exploited?
There is no confirmed exploitation: CVE-2024-52581 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.21% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2024-52581?
High: CVSS 8.2 (v4.0, scored by CNA). Remote, no login needed.
Which versions are affected by CVE-2024-52581?
litestar < 2.13.0; starlite <= 1.51.16.
Is there a fix for CVE-2024-52581?
Yes. Fixed in 2.13.0. Upgrade litestar to 2.13.0 or later.
How do I check if I'm affected by CVE-2024-52581?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.