CVE-2025-62727
Python vulnerability analysis and mitigation

Overview

Starlette, a lightweight ASGI framework/toolkit, contains a vulnerability (CVE-2025-62727) affecting versions 0.39.0 to 0.49.1. The vulnerability was discovered on October 28, 2025, and allows an unauthenticated attacker to send a crafted HTTP Range header that triggers quadratic-time processing in Starlette's FileResponse Range parsing/merging logic (GitHub Advisory, NVD).

Technical details

The vulnerability exists in the FileResponse._parse_range_header() method where the parsing loop uses a regular expression vulnerable to denial of service due to its O(n^2) complexity. The merge loop processes each input range by scanning the entire result list, yielding quadratic behavior with many disjoint ranges. The vulnerability has been assigned a CVSS v3.1 base score of 7.5 (HIGH) with vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, indicating high availability impact with network access (GitHub Advisory).

Impact

This vulnerability enables CPU exhaustion per request, causing denial‑of‑service for endpoints serving files (e.g., StaticFiles or any use of FileResponse). It affects any Starlette application that uses StaticFiles or direct FileResponse responses, including frameworks built on Starlette such as FastAPI (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been fixed in version 0.49.1. Users should upgrade to this version to mitigate the issue. The fix optimizes the HTTP ranges parsing logic to prevent the quadratic-time processing vulnerability (GitHub Release).

Community reactions

The vulnerability fix release received positive community engagement, with 10 reactions on GitHub including thumbs up and heart emojis from the developer community (GitHub Release).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-23949HIGH8.6
  • PythonPython
  • jaraco.context
NoYesJan 20, 2026
CVE-2026-22219HIGH8.3
  • PythonPython
  • chainlit
NoYesJan 20, 2026
CVE-2026-23842HIGH7.5
  • PythonPython
  • chatterbot
NoYesJan 19, 2026
CVE-2026-23877MEDIUM5.3
  • PythonPython
  • swingmusic
NoYesJan 19, 2026
CVE-2026-23833LOW1.7
  • PythonPython
  • esphome
NoYesJan 19, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management