Starlette is a lightweight ASGI (Asynchronous Server Gateway Interface) framework/toolkit, designed for building async web services in…
CVE-2025-54121
Summary When parsing a multi-part form with large files (greater than the [default max spool size](https://github.com/encode/starlette/blob/fa5355442753f794965ae1af0f87f9fec1b9a3de/starlette/formparsers.py#L126)) starlette will block the main thread to roll the file over to disk. This blocks the event thread which means we can't accept new connections. Details Please see this discussion for details: https://github.com/encode/starlette/discussions/2927#discussioncomment-13721403. In summary the following UploadFile code (copied from [here](https://github.com/encode/starlette/blob/fa5355442753f794965ae1af0f87f9fec1b9a3de/starlette/datastructures.py#L436C5-L447C14)) has a minor bug. Instead of just checking for self.inmemory we should also check if the additional bytes will cause a rollover. python @property def inmemory(self) -> bool: check for SpooledTemporaryFile.rolled rolledtodisk = getattr(self.file, "rolled", True) return not rolledtodisk async def write(self, data: bytes) -> None: if self.size is not None: self.size += len(data) if self.inmemory: self.file.write(data) else: await runinthreadpool(self.file.write, data) I have already created a PR which fixes the problem:…
Assessment
- CVSS
- 5.3 (v3.1)
- Severity
- Medium
- EPSS
- 0.66% chance of exploitation in the next 30 days
- Known exploited
- Not listed in CISA KEV
- Exploit availability
- Nothing found in Exploit-DB, Metasploit, Nuclei or public PoC repositories
- Published
- 21 July 2025
- Last updated
- 17 June 2026
- Weakness
- CWE-770
- Assigner
- security-advisories@github.com
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
At the source
References
- https://github.com/encode/starlette/blob/fa5355442753f794965ae1af0f87f9fec1b9a3de/starlette/datastructures.py#L436C5-L447C14
- https://github.com/encode/starlette/commit/9f7ec2eb512fcc3fe90b43cb9dd9e1d08696bec1
- https://github.com/encode/starlette/discussions/2927#discussioncomment-13721403
- https://github.com/encode/starlette/security/advisories/GHSA-2c2j-9gv5-cj73
- https://nvd.nist.gov/vuln/detail/CVE-2025-54121
- https://github.com/advisories/GHSA-2c2j-9gv5-cj73
Community proofs of concept
No community proof of concept yet. If you have one for a published vulnerability and the right to share it, add it below — it will appear here once reviewed.
Submit a proof of concept
Only for publicly disclosed vulnerabilities, and only material from testing you were authorised to perform. This platform does not buy, sell, or broker exploits — see earning from vulnerability research for legitimate bounty programs. Submissions are reviewed before they appear. Text only; do not include live credentials, personal data, or anything targeting systems you are not permitted to test.
Query this programmatically
Agents can read this through the MCP endpoint, or over HTTP:
curl https://cve.zerocrew.in/api/cve/CVE-2025-54121