Advisory

PYSEC-2024-178

Also known as: CVE-2024-52581, GHSA-gjcc-jvgw-wvwj, PYSEC-2026-1944

Summary

The record has no summary.

Details

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.

Severity

High Basis: CVSS v3 score 7.5, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Dates

Published
2024-11-20 21:15 UTC
Modified
2026-07-07 17:56 UTC

Affected packages and fixes

litestar

PyPI · All systems

Affected

  • introduced 0, fixed 2.13.0 (ecosystem)

Fixed versions

2.13.0

Fix

  • Fixed version 2.13.0
    pip install --upgrade litestar==2.13.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences