CVE-2025-54121encode starlette
Medium 5.3 No auth needed
Follow: this CVE · encode · encode starlette We alert you by email or Slack (account required).
- Priority
- 47
- CVSS 3.1
- 5.3
- EPSS
- —
- Auth required
- No
- Published
- Jul 21, 2025
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-770
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
What happens
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.
What to do
- Apply the vendor's security update for starlette.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | starlette |
< 0.47.2 |
0.47.2 |
pip install "starlette>=0.47.2" |
| PyPI | starlette |
< 0.47.2 |
0.47.2 |
pip install "starlette>=0.47.2" |
Per OSV / GitHub Advisories (GHSA-2c2j-9gv5-cj73, PYSEC-2026-1941). Check the version in your lockfile before upgrading.
Affected products
- encode · starlette
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official advisories
- Security update for python-starlette · SUSE · SUSE-SU-2026:22151-1 · Jun 17, 2026 High
- Security update for python-starlette · SUSE · openSUSE-SU-2026:20975-1 · Jun 17, 2026 High
Vendor, CERT and distribution advisories that name this CVE. Original titles.
Official sources
References
Links published by the sources. Open them with care.