Skip to main content

Starlette CVE-2025-62727

HIGH
Inefficient Algorithmic Complexity (CWE-407)
2025-10-28 security-advisories@github.com
7.5
CVSS 3.1 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach file-serving endpoint (StaticFiles/FileResponse)
  2. Exploit
    Send crafted multi-range Range header
  3. Execution
    Trigger O(n^2) range parse/merge
  4. Impact
    CPU exhaustion denial-of-service

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
Exploitation Conditions

The target application must serve files through starlette.responses.FileResponse directly or via starlette.staticfiles.StaticFiles, and must run an affected version (>=0.39.0 and <=0.49.0). No authentication, user interaction, or non-default configuration is required beyond the presence of a file-serving endpoint - exploitation is a single crafted HTTP Range header (many small disjoint ranges or long numeric substrings) sent by any remote unauthenticated client. Limiting factor: applications that expose no FileResponse/StaticFiles endpoints are not exploitable, and the impact is confined to CPU/availability with no data or integrity consequence.

Impact

This is a genuine but bounded availability risk. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, base 7.5 HIGH) is internally consistent with the description: a remote, unauthenticated attacker (PR:N confirmed) can trigger CWE-407 algorithmic-complexity DoS with a single crafted Range header, and the impact is confined to availability (C:N/I:N - no data exposure or code execution). Supporting signals are modest: EPSS is only 0.68% (51st percentile), and the CVE is NOT in CISA KEV, so there is no evidence of active exploitation. However, a working PoC IS published in the GHSA advisory and the fix commit is public, lowering the barrier to opportunistic abuse. Net: treat as a real patch-promptly issue for internet-facing services using StaticFiles/FileResponse, but it is availability-only - it cannot be used for data theft or lateral movement, so it ranks below RCE/auth-bypass flaws of the same 7.5 score. Note a data conflict to flag for triage: the input Tag 'Information Disclosure' contradicts the CVSS vector (C:N) and CWE-407 - this is a denial-of-service/availability flaw, not information disclosure.

Exploit ScenarioDerived

An attacker sends a single unauthenticated HTTP GET request with a crafted Range header (e.g. many disjoint small ranges or long numeric substrings) to any endpoint that returns a FileResponse or is served by StaticFiles. Starlette's O(n^2) range parsing/merging consumes excessive CPU per request, and a small volume of such requests exhausts worker CPU and denies service to legitimate users. A public PoC demonstrating the quadratic blow-up is included in the GHSA advisory.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.7% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 08, 2026

Unauthenticated CPU-exhaustion denial of service in Starlette 0.39.0 through 0.49.0 lets any remote client take down file-serving endpoints by sending a single crafted HTTP Range header. The Range parsing and merging logic in starlette.responses.FileResponse processes attacker-controlled numeric substrings and many small disjoint ranges in quadratic time, so each request can pin a worker's CPU; any application exposing StaticFiles or a direct FileResponse (downloads, media, static assets) is affected. Publicly available exploit code exists in the upstream GitHub advisory (GHSA-7f5h-v6xp-fcq8), and the issue is fixed in 0.49.1; EPSS is low at 0.68% (51st percentile) with no CISA KEV listing, so this is a genuine but bounded availability risk rather than a mass-exploitation event.

RemediationAI

Upgrade starlette to 0.49.1 or later, the vendor-released fixed version (https://github.com/Kludex/starlette/releases/tag/0.49.1), which removes the vulnerable regex parsing path; the individual upstream fixes are commits 4ea6e22b489ec388d6004cfbca52dd5b147127c5 and 69ed26a85956ef4bd0161807eb27abf49be7cd3c, and the advisory at https://github.com/Kludex/starlette/security/advisories/GHSA-7f5h-v6xp-fcq8 documents the flaw. If immediate upgrade is not possible, compensating controls must be applied at the edge: have the reverse proxy or load balancer (nginx, HAProxy, CDN) reject or truncate Range headers with more than a small number of comma-separated sub-ranges and cap total header length - this defeats the many-disjoint-ranges and long-digit-string payloads, but it can break legitimate multi-range clients and you must pick a threshold above your normal media/download usage. A blunter option is to strip the Range header entirely from requests to file-serving routes, which disables byte-range requests and therefore breaks resumable downloads, partial content (206) responses, and video seeking. Additionally, restrict internet exposure of large static-file endpoints where feasible, apply per-IP rate limiting and request timeouts so a single request cannot monopolize a worker indefinitely, and monitor for requests with abnormally long or many-part Range values. Because the impact is CPU/availability only (no confidentiality or integrity loss), applying these controls while scheduling the upgrade is a proportionate response.

Affected Packages

pypi starlette fix: 0.49.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Starlette is a lightweight ASGI framework/toolkit underpinning FastAPI and many other Python async web services; its FileResponse class implements HTTP byte-range support for file downloads, and StaticFiles serves assets by returning FileResponse instances. The root cause is CWE-407 (Inefficient Algorithmic Complexity) in FileResponse._parse_range_header(): the pre-fix code used the regular expression r"(\d*)-(\d*)" with re.findall over the raw Range value, and crafted inputs with long digit runs (e.g. thousands of '0' characters followed by 'a-') drove quadratic-time regex scanning. A second O(n^2) factor came from the subsequent range-merging loop, which scans the entire accumulated result list for every incoming sub-range, so a header packed with many small, non-overlapping ranges also maximizes comparisons. Because the parsed value comes straight from the client's Range header and is processed synchronously before any file I/O, the CPU cost is attacker-controlled and repeated cheaply. The package is identified as pip/starlette in the advisory metadata; the upstream fix (commits 4ea6e22b489ec388d6004cfbca52dd5b147127c5 and 69ed26a85956ef4bd0161807eb27abf49be7cd3c, released as 0.49.1) removes the regex entirely in favor of an explicit _parse_ranges classmethod that splits on commas and dashes and wraps integer conversion in try/except ValueError, discarding malformed entries instead of backtracking.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (github) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 7.5 HIGH

Remote unauthenticated single-request CPU-exhaustion DoS (AV:N/AC:L/PR:N/UI:N), availability-only impact so C:N/I:N/A:H, no scope change (S:U).

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Red Hat 7.5 HIGH

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

A high-severity availability flaw in Starlette, the Python web framework that underpins many FastAPI and internal API services, allows a single malformed HTTP request to consume a server worker's CPU and degrade or interrupt file downloads, media delivery, and static asset serving for every user of an affected application. The affected versions (0.39.0 through 0.49.0) are common in internet-facing deployments, and publicly available exploit code exists, so the risk is a realistic and easily triggered service outage rather than a data-breach scenario. Leadership should care because the impact is direct loss of service availability and customer-facing disruption across any product that serves files through this framework, and remediation depends on a dependency upgrade that may span many teams and services.

Business Impact: High
Compensating Controls

Apply vendor patch (upgrade to Starlette 0.49.1); where an immediate upgrade is not feasible, mitigate with reverse-proxy or WAF rejection and normalization of malicious Range headers, limits on range count and total span, per-client rate limiting, CPU and worker-pool monitoring with alerting, and capacity headroom to absorb degraded throughput.

Threat Intelligence Overview

EPSS Score
0.7%
Top 49% exploitable
Prevalence
High
core ASGI framework underlying FastAPI, widely deployed in Python web apps
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.7%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

39
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy