7.5
HIGH
CVE-2024-52581
Litestar ASGI Multipart Form Parser Buffer Overflow
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.

INFO

Published Date :

Nov. 20, 2024, 9:15 p.m.

Last Modified :

Nov. 25, 2024, 2:15 p.m.

Remotely Exploitable :

Yes !

Impact Score :

3.6

Exploitability Score :

3.9
Affected Products

The following products are affected by CVE-2024-52581 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Litestar litestar
References to Advisories, Solutions, and Tools

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2024-52581 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2024-52581 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by [email protected]

    Nov. 25, 2024

    Action Type Old Value New Value
    Added Reference https://github.com/litestar-org/litestar/security/advisories/GHSA-p24m-863f-fm6q
    Removed Reference https://github.com/litestar-org/litestar/security/advisories/GHSA-p24m-863f-fm6q)
    Removed Reference Type https://github.com/litestar-org/litestar/security/advisories/GHSA-p24m-863f-fm6q) Types: Broken Link
  • Initial Analysis by [email protected]

    Nov. 22, 2024

    Action Type Old Value New Value
    Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
    Added CPE Configuration OR *cpe:2.3:a:litestar:litestar:*:*:*:*:*:*:*:* versions up to (excluding) 2.13.0
    Changed Reference Type https://github.com/litestar-org/litestar/blob/main/litestar/_multipart.py#L97 No Types Assigned https://github.com/litestar-org/litestar/blob/main/litestar/_multipart.py#L97 Product
    Changed Reference Type https://github.com/litestar-org/litestar/commit/53c1473b5ff7502816a9a339ffc90731bb0c2138 No Types Assigned https://github.com/litestar-org/litestar/commit/53c1473b5ff7502816a9a339ffc90731bb0c2138 Patch
    Changed Reference Type https://github.com/litestar-org/litestar/security/advisories/GHSA-gjcc-jvgw-wvwj No Types Assigned https://github.com/litestar-org/litestar/security/advisories/GHSA-gjcc-jvgw-wvwj Exploit, Vendor Advisory
    Changed Reference Type https://github.com/litestar-org/litestar/security/advisories/GHSA-p24m-863f-fm6q) No Types Assigned https://github.com/litestar-org/litestar/security/advisories/GHSA-p24m-863f-fm6q) Broken Link
  • CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0

    Nov. 21, 2024

    Action Type Old Value New Value
    Removed CVSS V3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
  • CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0

    Nov. 21, 2024

    Action Type Old Value New Value
    Added CVSS V3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
  • CVE Received by [email protected]

    Nov. 20, 2024

    Action Type Old Value New Value
    Added 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.
    Added Reference GitHub, Inc. https://github.com/litestar-org/litestar/security/advisories/GHSA-gjcc-jvgw-wvwj [No types assigned]
    Added Reference GitHub, Inc. https://github.com/litestar-org/litestar/security/advisories/GHSA-p24m-863f-fm6q) [No types assigned]
    Added Reference GitHub, Inc. https://github.com/litestar-org/litestar/commit/53c1473b5ff7502816a9a339ffc90731bb0c2138 [No types assigned]
    Added Reference GitHub, Inc. https://github.com/litestar-org/litestar/blob/main/litestar/_multipart.py#L97 [No types assigned]
    Added CWE GitHub, Inc. CWE-770
    Added CVSS V4.0 GitHub, Inc. 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
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2024-52581 is associated with the following CWEs:

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability