Skip to content
OpenAdvisories
High · 8.7 CVE-2024-47874 EUVD-2024-3029GHSA-f96h-pmfr-66vwPYSEC-2026-1943

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

Published Oct 15, 2024 · Updated Nov 21, 2024 · Assigned by GitHub_M

Description

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.

Affected products

VendorProductAffectedFixed
encode starlette < 0.40.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 starlette 0.41.0-1 —
Debian 13 starlette 0.41.0-1 —
Debian 12 starlette 0.26.1-1+deb12u1 —
ReleasePackageFixed inAdvisory
Ubuntu 24.04 LTS starlette No fix yet —
Ubuntu 22.04 LTS starlette No fix yet —
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-starlette 0.41.0-1.1 openSUSE-SU-2026:11626-1, openSUSE-SU-2024:14417-1
openSUSE Leap 15.6 python-starlette 0.35.1-150600.3.3.1 SUSE-SU-2024:3719-1

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling reflex 0.6.4-r0 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI starlette < 0.40.0 0.40.0 GHSA-f96h-pmfr-66vw

Advisories 3

References