CVE-2024-52581

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

Configuration 1 (hide)

cpe:2.3:a:litestar:litestar:*:*:*:*:*:*:*:*

History

25 Nov 2024, 14:15

Type Values Removed Values Added
References
  • {'url': 'https://github.com/litestar-org/litestar/security/advisories/GHSA-p24m-863f-fm6q)', 'tags': ['Broken Link'], 'source': 'security-advisories@github.com'}
  • () https://github.com/litestar-org/litestar/security/advisories/GHSA-p24m-863f-fm6q -

22 Nov 2024, 21:33

Type Values Removed Values Added
CPE cpe:2.3:a:litestar:litestar:*:*:*:*:*:*:*:*
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 7.5
First Time Litestar
Litestar litestar
Summary
  • (es) Litestar es un framework de interfaz de puerta de enlace de servidor asincrónico (ASGI). Antes de la versión 2.13.0, el analizador de formularios multiparte que se incluye con litestar espera que todo el cuerpo de la solicitud sea una cadena de un solo byte y no hay un límite predeterminado para el tamaño total del cuerpo de la solicitud. Esto permite que un atacante cargue archivos arbitrarios de gran tamaño envueltos en una solicitud `multipart/form-data` y provoque un consumo excesivo de memoria en el servidor. El analizador de formularios multiparte en las versiones afectadas es vulnerable a este tipo de ataque por diseño. La firma del método público, así como su implementación, esperan que todo el cuerpo de la solicitud esté disponible como una cadena de un solo byte. No es posible aceptar cargas de archivos grandes de forma segura utilizando este analizador. Esto puede ser una regresión, ya que ya se informó de una variación de este problema en CVE-2023-25578. Limitar el número de partes no es suficiente para evitar errores de falta de memoria en el servidor. Hay un parche disponible en la versión 2.13.0.
References () https://github.com/litestar-org/litestar/blob/main/litestar/_multipart.py#L97 - () https://github.com/litestar-org/litestar/blob/main/litestar/_multipart.py#L97 - Product
References () https://github.com/litestar-org/litestar/commit/53c1473b5ff7502816a9a339ffc90731bb0c2138 - () https://github.com/litestar-org/litestar/commit/53c1473b5ff7502816a9a339ffc90731bb0c2138 - Patch
References () https://github.com/litestar-org/litestar/security/advisories/GHSA-gjcc-jvgw-wvwj - () https://github.com/litestar-org/litestar/security/advisories/GHSA-gjcc-jvgw-wvwj - Exploit, Vendor Advisory
References () https://github.com/litestar-org/litestar/security/advisories/GHSA-p24m-863f-fm6q) - () https://github.com/litestar-org/litestar/security/advisories/GHSA-p24m-863f-fm6q) - Broken Link

20 Nov 2024, 21:15

Type Values Removed Values Added
New CVE

Information

Published : 2024-11-20 21:15

Updated : 2024-11-25 14:15


NVD link : CVE-2024-52581

Mitre link : CVE-2024-52581

CVE.ORG link : CVE-2024-52581


JSON object : View

Products Affected

litestar

  • litestar
CWE
CWE-770

Allocation of Resources Without Limits or Throttling