Executive brief
Starlette is a lightweight Python web framework used to build high-performance web APIs and applications. When processing multipart form submissions containing large files, the framework can block its main event thread during file operations, preventing it from accepting new incoming connections and causing a temporary denial of service.
Technical details
The vulnerability exists in Starlette's UploadFile class, which handles multipart form file uploads. When a file exceeds the default in-memory spool size, the code should check whether additional incoming data will trigger a rollover to disk before writing, but instead only checks the current state. This causes blocking disk I/O operations to execute on the main thread instead of a threadpool, stalling the async event loop. The vulnerability affects all versions prior to 0.47.2. The attack requires sending multipart form data with large files but no special privileges or authentication; the impact on modern storage systems is minimal, though systems with slower I/O may experience more noticeable delays.
Affected products
- Encode Starlette before 0.47.2
Timeline
- 2025-07-21: disclosed
- 2025-07-21: patched: Fixed in version 0.47.2