CVE-2025-54121

Starlette has possible denial-of-service vector when parsing large files in multipart forms

Published Jul 21, 2025 CVSS 3.1 · 5.3 Medium EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DSA Debian DSA DSA-6302-1 starlette security update
EUVD EUVD EUVD-2025-22159 Starlette has possible denial-of-service vector when parsing large files in multipart forms
Github GHSA Github GHSA GHSA-2c2j-9gv5-cj73 Starlette has possible denial-of-service vector when parsing large files in multipart forms
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Encode
Encode starlette
Vendors & Products Encode
Encode starlette
Type Values Removed Values Added
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.
Title Starlette has possible denial-of-service vector when parsing large files in multipart forms
Weaknesses CWE-770
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 22, 2025, 7:54 PM
Reserved
Jul 16, 2025, 11:53 PM
Status
Deferred
Published
Jul 21, 2025, 8:15 PM
Modified
Jun 17, 2026, 9:39 AM
Severity
Moderate
Public date
Jul 21, 2025, 8:06 PM