CVEfocus › CVE database › CVE-2024-47874

CVE-2024-47874Starlette Denial of service (DoS) via multipart/form-data

CVSS 8.7 HighEPSS 0.9% (higher than 59% of CVEs)Published 2024-10-15Updated 2024-11-21Assigner: GitHub_M

Starlette is an Asynchronous Server Gateway Interface (ASGI) framework/toolkit. Prior to version 0.40.0, Starlette treats `multipart/form-data` parts without a `filename` as text form fields and buffers those in byte strings with no size limit. This allows an attacker to upload arbitrary large form fields and cause Starlette to both slow down significantly due to excessive memory allocations and copy operations, and also consume more and more memory until the server starts swapping and grinds to a halt, or the OS terminates the server process with an OOM error. Uploading multiple such requests in parallel may be enough to render a service practically unusable, even if reasonable request size limits are enforced by a reverse proxy in front of Starlette. This Denial of service (DoS) vulnerability affects all applications built with Starlette (or FastAPI) accepting form requests. Verison 0.40.0 fixes this issue.

CWE-770

What to do

Fixed builds are available from Debian, PyPI: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

4Fixed
2Under investigation
2Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04starletteNot affected
vulnerable_code_not_present
Ubuntu 25.10starletteNot affected
vulnerable_code_not_present
Ubuntu 24.04starletteUnder investigationUBUNTU-CVE-2024-47874
Ubuntu 22.04starletteUnder investigationUBUNTU-CVE-2024-47874
Debian 14starletteFixed0.41.0-1DEBIAN-CVE-2024-47874
Debian 13starletteFixed0.41.0-1DEBIAN-CVE-2024-47874
Debian 12starletteFixed0.26.1-1+deb12u1DEBIAN-CVE-2024-47874
PyPI librarystarletteFixed0.40.0GHSA-f96h-pmfr-66vw

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.