# CVE-2024-52581: Litestar allows unbounded resource consumption (DoS vulnerability)

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.2
- **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:L`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 1.21% (percentile 68, 2026-11-28)
- **CWE:** CWE-770
- **Aliases:** GHSA-gjcc-jvgw-wvwj, PYSEC-2024-178, PYSEC-2026-1944
- **Published:** 2024-11-20T20:50:19.679Z
- **Modified:** 2026-07-07T17:56:22.628Z

## 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

## 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

- PyPI `litestar`: affected \< 2.13.0; fixed 2.13.0 (osv)
- PyPI `starlite`: affected \<= 1.51.16; fixed no fix listed yet (osv)
- litestar-org litestar: \< 2.13.0 (cvelist)

## Mitigation

- Upgrade litestar to 2.13.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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-28).

### 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.

## References

- vendor: <https://github.com/litestar-org/litestar/security/advisories/GHSA-gjcc-jvgw-wvwj>
- vendor: <https://github.com/litestar-org/litestar/security/advisories/GHSA-p24m-863f-fm6q>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2024-52581>
- vendor: <https://github.com/advisories/GHSA-gjcc-jvgw-wvwj>
- patch: <https://github.com/litestar-org/litestar/commit/53c1473b5ff7502816a9a339ffc90731bb0c2138>
- other: <https://github.com/litestar-org/litestar/blob/main/litestar/_multipart.py#L97>
- other: <https://github.com/litestar-org/litestar>
- other: <https://github.com/pypa/advisory-database/tree/main/vulns/litestar/PYSEC-2024-178.yaml>
- other: <https://pypi.org/project/starlite>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-52581>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-gjcc-jvgw-wvwj> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2024-178> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2026-1944> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2024-52581> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-52581>
