# CVE-2025-54121: PYSEC-2026-1941 - Starlette has possible denial-of-service vector when parsing large files in multipart forms

Source: https://junglewise.ai/threats/cve-2025-54121-starlette-denial-of-service-in-multipart-form-parsing  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-07. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2025-54121 · Severity: low · CVSS 3.1 · Published 2026-07-07

Starlette is a lightweight Python web framework used to build high-performance web APIs and applications. When processing multipart form submissions containing large files, the framework can block its main event thread during file operations, preventing it from accepting new incoming connections and causing a temporary denial of service.

Technologies: [starlette (PyPI)](https://junglewise.ai/threats/technologies/pypi-starlette). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2025-54121 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2025-54121 being exploited in the wild.

**How severe is CVE-2025-54121?** Low severity, with a CVSS score of 3.1, published 7 July 2026.

**Which products and versions are affected?** starlette (PyPI) ECOSYSTEM:introduced=0,fixed=0.47.2.

**Is there a fix for CVE-2025-54121?** Yes. starlette (PyPI): upgrade to 0.47.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2025-54121 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2025-54121?** Check whether you run starlette (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- starlette (PyPI): upgrade to 0.47.2 or later

  ```sh
  pip install "starlette>=0.47.2"
  ```


## Technical details

The vulnerability exists in Starlette's UploadFile class, which handles multipart form file uploads. When a file exceeds the default in-memory spool size, the code should check whether additional incoming data will trigger a rollover to disk before writing, but instead only checks the current state. This causes blocking disk I/O operations to execute on the main thread instead of a threadpool, stalling the async event loop. The vulnerability affects all versions prior to 0.47.2. The attack requires sending multipart form data with large files but no special privileges or authentication; the impact on modern storage systems is minimal, though systems with slower I/O may experience more noticeable delays.

## Affected products

- Encode Starlette before 0.47.2

## Identifiers

- CVE-2025-54121
- GHSA-2c2j-9gv5-cj73
- PYSEC-2026-1941

## Timeline

- 2025-07-21: disclosed
- 2025-07-21: patched: Fixed in version 0.47.2

## References

- [https://github.com/encode/starlette/security/advisories/GHSA-2c2j-9gv5-cj73](https://github.com/encode/starlette/security/advisories/GHSA-2c2j-9gv5-cj73)

## Related threats

- [PYSEC-2026-1943 - Starlette Denial of service (DoS) via multipart/form-data](https://junglewise.ai/threats/cve-2024-47874-starlette-denial-of-service-dos-via-multipart-form-data)
- [Starlette denial of service via resource limit bypass in request.form](https://junglewise.ai/threats/cve-2026-54283-starlette-denial-of-service-via-resource-limit-bypass-in-request)
- [Kludex Starlette hostname spoofing via unvalidated request path](https://junglewise.ai/threats/cve-2026-54282-kludex-starlette-hostname-spoofing-via-unvalidated-request-path)
- [Starlette unsafe reflection in HTTPEndpoint method dispatching](https://junglewise.ai/threats/cve-2026-48817-starlette-unsafe-reflection-in-httpendpoint-method-dispatching)
- [Kludex Starlette SSRF and NTLM credential theft in StaticFiles on Windows](https://junglewise.ai/threats/cve-2026-48818-kludex-starlette-ssrf-and-ntlm-credential-theft-in-staticfiles-on)
