CVE-2024-47874
highpriority · track · 0EPSS 0.007 · 51 %ileEURUUSEPSS · scored 2026-10-27
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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · none–high · 0–8.7
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (4)
Products and version ranges known to be affected.
advisories (2)
Vendor and ecosystem advisories describing this.
- GHSA-f96h-pmfr-66vwStarlette Denial of service (DoS) via multipart/form-data2024-10-15ghsa · osvUS
### 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 ```python 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"]), ]) ``` ```sh 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.
- PYSEC-2026-1943Starlette Denial of service (DoS) via multipart/form-data2026-07-07vendor · osvUS
### 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 ```python 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"]), ]) ``` ```sh 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.
also known as (7)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (8)
External citations — patches, advisories, analysis.
- https://access.redhat.com/security/cve/cve-2024-47874cnnvd
- https://cxsecurity.com/cveshow/CVE-2024-47874/cnnvd
- https://github.com/encode/starlette/commit/fd038f3070c302bff17ef7d173dbb0b007617733cnnvd
- https://github.com/encode/starlette/security/advisories/GHSA-f96h-pmfr-66vwcnnvd
- https://github.com/encode/starlette/commit/fd038f3070c302bff17ef7d173dbb0b007617733enisa_euvd
- https://github.com/encode/starlette/security/advisories/GHSA-f96h-pmfr-66vwenisa_euvd
- https://github.com/encode/starlette/commit/fd038f3070c302bff17ef7d173dbb0b007617733nvd
- https://github.com/encode/starlette/security/advisories/GHSA-f96h-pmfr-66vwnvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan