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

- Severity: Medium 5.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.66%, higher than 52% of CVEs (2026-12-01)
- Published: 2025-07-21T19:34:23.000Z
- Modified: 2026-09-10T03:50:25.704Z
- Also known as: GHSA-2c2j-9gv5-cj73, PYSEC-2026-1941
- Weaknesses: CWE-770
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- encode starlette: < 0.47.2
- starlette (PyPI): before 0.47.2

## Every score

- GitHub_M: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- GitHub: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- PyPA Advisory Database: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`

## References

- <https://github.com/encode/starlette/security/advisories/GHSA-2c2j-9gv5-cj73> (web)
- <https://github.com/encode/starlette/commit/9f7ec2eb512fcc3fe90b43cb9dd9e1d08696bec1> (fix, web)
- <https://github.com/encode/starlette/blob/fa5355442753f794965ae1af0f87f9fec1b9a3de/starlette/datastructures.py#L436C5-L447C14> (web)
- <https://github.com/encode/starlette/discussions/2927#discussioncomment-13721403> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-54121> (advisory)
- <https://github.com/encode/starlette> (package)
- <https://pypi.org/project/starlette> (package)
- <https://github.com/advisories/GHSA-2c2j-9gv5-cj73> (advisory)

## Sources

- CVE List: [CVE-2025-54121](https://www.cve.org/CVERecord?id=CVE-2025-54121), CVE Terms of Use, modified 2025-07-22
- GitHub Advisory Database: [GHSA-2c2j-9gv5-cj73](https://github.com/advisories/GHSA-2c2j-9gv5-cj73), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2025-54121](https://nvd.nist.gov/vuln/detail/CVE-2025-54121), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-1941](https://osv.dev/vulnerability/PYSEC-2026-1941), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2025-54121 · Whole record: https://cve.day/CVE-2025-54121.json · Rebuilt by cve.day 2026-11-25T22:59:01.515Z
