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
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| 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.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | starlette | 0.41.0-1 | — |
| Debian 13 | starlette | 0.41.0-1 | — |
| Debian 12 | starlette | 0.26.1-1+deb12u1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 24.04 LTS | starlette | No fix yet | — |
| Ubuntu 22.04 LTS | starlette | No fix yet | — |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | reflex | 0.6.4-r0 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | starlette | < 0.40.0 | 0.40.0 | GHSA-f96h-pmfr-66vw |
Advisories 3
- openSUSE-SU-2026:11626-1 python313-starlette-1.6.0-1.1 on GA media SUSE / openSUSE Security Updates · Aug 28, 2026
- SUSE-SU-2024:3719-1 Security update for python-starlette SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:14417-1 python310-starlette-0.41.0-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026