Starlette Denial of service (DoS) via multipart/form-data
Summary
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.
PoC
from starlette.applications import Starlette
from starlette.routing import Route
async def poc(request):
async with request.form():
pass
app = Starlette(routes=[
Route('/', poc, methods=["POST"]),
])
curl http://localhost:8000 -F 'big=</dev/urandom'
Impact
This Denial of service (DoS) vulnerability affects all applications built with Starlette (or FastAPI) accepting form requests.
Betroffene Software
Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.
| Plattform | Paket | Anfällige Versionen | Behoben in |
|---|---|---|---|
| Python (PyPI) | starlette | < 0.40.0 | 0.40.0 |
Verweise
- https://github.com/encode/starlette/security/advisories/GHSA-f96h-pmfr-66vw
- https://nvd.nist.gov/vuln/detail/CVE-2024-47874
- https://github.com/encode/starlette/commit/fd038f3070c302bff17ef7d173dbb0b007617733
- https://github.com/encode/starlette
- https://pypi.org/project/starlette
- https://github.com/advisories/GHSA-f96h-pmfr-66vw
- CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N- Schwäche (CWE)
CWE-770- Plattform
- Python (PyPI)
- Paket
starlette- Veröffentlicht
- 15.10.2024
- Aktualisiert
- 11.10.2026 15:17
Quellen und Lizenzen
OSV / GitHub Advisory Database - PYSEC-2026-1943 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-f96h-pmfr-66vw - CC BY 4.0
Schwachstellenhistorie: starlette
Alle veröffentlichten Schwachstellen dieses Pakets (Python (PyPI)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.
- Einträge insgesamt
- 10
- Erste → letzte
- 02.2023 06.2026
- Ohne Fix
- 0
- In Angriffen ausgenutzt
- 1
Verteilung nach Schweregrad
- Hoch 5
- Mittel 4
- Niedrig 1
Veröffentlichungen pro Jahr
- 2023: 2
- 2024: 1
- 2025: 2
- 2026: 5
-
Starlette Denial of service (DoS) via multipart/form-data dieser Eintrag
Erkennen Sie Schwachstellen in Ihrer Anwendung
Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.