Bug 2318801 (CVE-2024-47874)

Summary: CVE-2024-47874 starlette: Starlette Denial of service (DoS) via multipart/form-data
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: anpicker, aprice, bparees, hasun, hkataria, jdobes, jeder, jfula, jowilson, jsamir, kaycoth, kshier, mpierce, nyancey, oezr, ometelka, orabin, ptisnovs, sthirugn, syedriko, vkrizan, xdharmai
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in Starlette. Starlette treats multipart/form-data parts without a filename as text form fields and buffers those in byte strings with no size limit. This flaw allows an attacker to upload arbitrary large form fields and cause Starlette to slow down significantly due to excessive memory allocations and copy operations also to consume more and more memory until the server starts swapping and grinds to a halt, or the OS terminates the server process with an out-of-memory (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.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2318804    
Bug Blocks:    

Description OSIDB Bzimport 2024-10-15 16:02:33 UTC
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.