Skip to main content
CVE-2025-54121VulnerabilityPublished

CVE-2025-54121: encode starlette · Unthrottled Resource Allocation

Affects encode starletteSource CVE Database V5

0

Not known to be exploited · CVSS 5.3 Medium : upgrade to 0.47.2 when convenient.

Data as of 25 Oct 2026, 19:02 UTC

CVSS 3.1 base score
5.3Medium
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.6% chance of exploitation in 30 days – higher than 51% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 0.47.2
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 21 Jul 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-25.

What to do

Upgrade encode starlette to 0.47.2.

Affected software

ProductAffectedFixed in
PyPIstarlettepkg:pypi/starletteOther threatsAffected
  • <0.47.2
Fixed in
  • 0.47.2

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

European organizations should immediately assess their use of the Starlette framework and identify any deployments running versions below 0.47.2. The primary mitigation is to upgrade Starlette to version 0.47.2 or later, where the bug in the UploadFile rollover logic is fixed. In addition to patching, organizations should implement the following practical controls: 1) Enforce strict limits on maximum file upload sizes at the application or web server level to prevent excessively large uploads that trigger rollover blocking. 2) Implement asynchronous or background processing for large file uploads to avoid blocking the main event loop. 3) Monitor application performance metrics and event loop responsiveness to detect abnormal blocking or slowdowns indicative of exploitation attempts. 4) Use web application firewalls (WAFs) or API gateways to throttle or block suspicious large multipart/form-data requests. 5) Conduct regular dependency audits and integrate automated vulnerability scanning in CI/CD pipelines to detect outdated Starlette versions. These measures collectively reduce the risk of denial-of-service attacks exploiting this vulnerability and improve overall resilience of asynchronous Python web services.

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.

References

Community reviews

Loading reviews…