CVE-2025-54121
Python vulnerability analysis and mitigation

Overview

CVE-2025-54121 affects Starlette, a lightweight ASGI (Asynchronous Server Gateway Interface) framework/toolkit for building async web services in Python. The vulnerability was discovered in versions 0.47.1 and below, where parsing multi-part forms with large files (greater than the default max spool size) causes the main thread to block when rolling the file over to disk, preventing the application from accepting new connections. The vulnerability was disclosed on July 20, 2025, and has been fixed in version 0.47.2 (GitHub Advisory).

Technical details

The vulnerability stems from a bug in the UploadFile code where the inmemory check fails to account for cases where additional bytes will cause a rollover to disk storage. The issue occurs in the write method, which only checks for the current memory state but not potential rollovers. This oversight can lead to disk I/O operations occurring on the main thread instead of being properly handled in a background thread. The vulnerability has been assigned a CVSS v3.1 score of 5.3 (Medium) with a vector string of CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L (GitHub Advisory).

Impact

The primary impact of this vulnerability is a potential denial-of-service condition when processing large files in multipart forms. When the file size exceeds the default max spool size, the application's event thread becomes blocked, preventing it from accepting new connections. The impact is considered moderate, particularly affecting systems with slower storage devices. On systems with modern HDDs/SSDs, the performance impact is less severe as form parsing is already CPU-intensive (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been fixed in Starlette version 0.47.2. The fix involves modifying the UploadFile code to check if additional bytes will cause a rollover before performing write operations. Users should upgrade to version 0.47.2 or later to address this vulnerability (GitHub Advisory).

Community reactions

The vulnerability was initially discovered and reported through GitHub Discussions, where it sparked a technical discussion about the nature of the issue and potential solutions. The community engagement led to the development and implementation of a fix, with several key contributors including HonakerM, defnull, and wai25 collaborating on the solution (GitHub Discussion).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-67511CRITICAL9.6
  • PythonPython
  • cai-framework
NoNoDec 09, 2025
CVE-2025-66645HIGH7.5
  • PythonPython
  • nicegui
NoYesDec 09, 2025
GHSA-9rwj-6rc7-p77cHIGH7.3
  • PythonPython
  • langgraph-checkpoint-sqlite
NoYesDec 10, 2025
CVE-2025-67502MEDIUM5.4
  • PythonPython
  • taguette
NoYesDec 10, 2025
CVE-2025-67485MEDIUM5.3
  • PythonPython
  • mad-proxy
NoNoDec 09, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management