CVE-2025-54121
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-07-21

Last updated on: 2025-07-22

Assigner: GitHub, Inc.

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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-07-21
Last Modified
2025-07-22
Generated
2026-05-07
AI Q&A
2025-07-21
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 2 associated CPEs
Vendor Product Version / Range
encode starlette 0.47.2
encode starlette 0.47.1
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-770 The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

In Starlette versions 0.47.1 and below, when handling multi-part form uploads with large files exceeding the default max spool size, the framework blocks the main event thread while rolling the file over to disk. This blocking prevents the application from accepting new connections. The issue arises because the UploadFile code only checks if the file is in memory, but does not properly check if additional bytes will cause a rollover to disk. This bug causes the event loop to be blocked during large file uploads.


How can this vulnerability impact me? :

This vulnerability can cause the Starlette application to become unresponsive during large file uploads, as the main event thread is blocked while rolling files over to disk. This means the application cannot accept new connections, potentially leading to denial of service or degraded performance for users.


What immediate steps should I take to mitigate this vulnerability?

Upgrade Starlette to version 0.47.2 or later, as this version contains the fix for the vulnerability that causes the main thread to block when parsing large multi-part form files.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart