CVE-2025-62727 Starlette vulnerable to O(n^2) DoS via Range header merging in starlette.responses.FileResponse

High 7.5 Published Updated

An unauthenticated attacker can cause CPU exhaustion and denial of service in Starlette applications by sending crafted HTTP Range headers to file-serving endpoints.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-62727?

CVE-2025-62727 is a high-severity denial of service vulnerability in Kludex starlette, published on 28 Oct 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Starlette is a lightweight ASGI framework/toolkit. Starting in version 0.39.0 and prior to version 0.49.1 , an unauthenticated attacker can send a crafted HTTP Range header that triggers quadratic-time processing in Starlette's FileResponse Range parsing/merging logic. This enables CPU exhaustion per request, causing denial‑of‑service for endpoints serving files (e.g., StaticFiles or any use of FileResponse). This vulnerability is fixed in 0.49.1.

Weakness: CWE-407

Which versions are affected by CVE-2025-62727?

3 open source packages ship an affected version, including starlette.

PackageAffectedFixed in
starlette PyPIFrom 0.39.00.49.1
starlette PyPIFrom 0.39.00.49.1
starlette PyPIFrom 0.39.00.49.1
Linux distribution packages (2)
python-sse-starlette openSUSE:TumbleweedAll versions3.2.0-1.1
python-starlette openSUSE:TumbleweedAll versions0.49.1-1.1

How do I fix CVE-2025-62727?

Upgrade starlette to 0.49.1 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2025-62727 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-62727 exists.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as CLEANSTART-2026-DA26043, CLEANSTART-2026-EZ52144, DEBIAN-CVE-2025-62727, ECHO-fc38-da22-1afb, GHSA-7f5h-v6xp-fcq8, MINI-ggwr-cwxw-xxwx and 6 more.

Is CVE-2025-62727 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free