CVE-2025-54121 Details
Description
Starlette is a lightweight ASGI (Asynchronous Server Gateway Interface) framework/toolkit, designed for building async web services in Python. In versions 0.47.1 and below, when parsing a multi-part form with large files (greater than the default max spool size) starlette will block the main thread to roll the file over to disk. This blocks the event thread which means the application can't accept new connections. The UploadFile code has a minor bug where instead of just checking for self._in_memory, the logic should also check if the additional bytes will cause a rollover. The vulnerability is fixed in version 0.47.2.
A denial-of-service vulnerability has been identified in Starlette, an ASGI framework for building asynchronous web services in Python. This issue affects versions prior to 0.47.1. When the framework parses multi-part forms containing large files that exceed the default maximum spool size, Starlette blocks the main thread to write the file to disk. This behavior disrupts the event thread, preventing the application from handling new connections. The vulnerability arises because the UploadFile component does not properly check if a write operation will cause a file to exceed its memory limit, leading to a rollover that is processed on the main thread.
Users can upgrade to Starlette version 0.47.2, which addresses the vulnerability by improving the file handling logic to prevent unnecessary blocking of the main thread.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jul 21, 2025CISA-ADP
Assessed Jul 22, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/encode/starlette/blob/fa5355442753f794965ae1af0f87f9fec1b9a3de/starlette/datastructures.py#L436C5-L447C14 | [email protected] | Source CodeVendor |
| https://github.com/encode/starlette/commit/9f7ec2eb512fcc3fe90b43cb9dd9e1d08696bec1 | [email protected] | Source CodeVendor |
| https://github.com/encode/starlette/discussions/2927#discussioncomment-13721403 | [email protected] | ExploitIssue TrackingTechnical DescriptionVendor |
| https://github.com/encode/starlette/security/advisories/GHSA-2c2j-9gv5-cj73 | [email protected] | AdvisoryRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-770 | Allocation of Resources Without Limits or Throttling | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| encode starlette | < 0.47.1 (semver) |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jul 21, 2025 | New CVE Received | [email protected] |
Volerion