Vulnerability · Published Nov 20, 2024 · Assigned by GitHub_M

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

High 8.2

In plain English

A high-severity resource allocation without limits in litestar from litestar-org. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.8% (higher than 57% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)8.2High
Exploit odds (30 days)0.8%top 43.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
PyPIlitestar2.13.0GHSA-gjcc-jvgw-wvwj
PyPIlitestar2.13.0PYSEC-2024-178
PyPIstarliteno fix listedGHSA-gjcc-jvgw-wvwj
PyPIstarliteno fix listedPYSEC-2026-1944

Affected products (as reported)

VendorProductVersions
litestar-org litestar < 2.13.0

Weakness: CWE-770 · Vector: 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

References