CVE-2024-52581
HIGH 8.2CVSS 4.0Litestar allows unbounded resource consumption (DoS vulnerability)
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.
- Published
- 20 Nov 2024
- Last modified
- 7 Jul 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-770
- Also known as
- GHSA-gjcc-jvgw-wvwjPYSEC-2024-178PYSEC-2026-1944
- Sources
- NVDJSONOSV GHSA-gjcc-jvgw-wvwjJSONOSV PYSEC-2024-178JSONOSV PYSEC-2026-1944JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | HIGH 8.2 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| OSV | GitHub | CVSS 4.0 | 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 | |
| OSV | PyPA | CVSS 4.0 | 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 | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | PyPA | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | litestar | litestarcpe:2.3:a:litestar:litestar:*:*:*:*:*:*:*:* |
< 2.13.0 | 2.13.0 |
| OSV | PyPI | litestar | < 2.13.0 | 2.13.0 |
| OSV | PyPI | starlite | <= 1.51.16 |
References
- https://github.com/litestar-org/litestar/blob/main/litestar/_multipart.py#L97 · Product, WEB
- https://github.com/litestar-org/litestar/commit/53c1473b5ff7502816a9a339ffc90731bb0c2138 · Patch, WEB, FIX
- https://github.com/litestar-org/litestar/security/advisories/GHSA-gjcc-jvgw-wvwj · Exploit, Vendor Advisory, WEB, ADVISORY, EVIDENCE
- https://github.com/litestar-org/litestar/security/advisories/GHSA-p24m-863f-fm6q · WEB, ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2024-52581 · ADVISORY
- https://github.com/litestar-org/litestar · PACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/litestar/PYSEC-2024-178.yaml · WEB
- https://github.com/advisories/GHSA-gjcc-jvgw-wvwj · ADVISORY
- https://pypi.org/project/starlite · PACKAGE
History
- 25 Nov 2026 20:56 UTC · NVD: first stored (published 20 Nov 2024)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 7 Jul 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 20 Nov 2024)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 20 Nov 2024)