⬆️ Upgrade dependency starlette to v0.49.1 [SECURITY] #135
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
This PR contains the following updates:
==0.47.3->==0.49.1GitHub Vulnerability Alerts
CVE-2025-62727
Summary
An unauthenticated attacker can send a crafted HTTP Range header that triggers quadratic-time processing in Starlette's
FileResponseRange parsing/merging logic. This enables CPU exhaustion per request, causing denial‑of‑service for endpoints serving files (e.g.,StaticFilesor any use ofFileResponse).Details
Starlette parses multi-range requests in
FileResponse._parse_range_header(), then merges ranges using an O(n^2) algorithm.The parsing loop of
FileResponse._parse_range_header()uses the regular expression which vulnerable to denial of service for its O(n^2) complexity. A craftedRangeheader can maximize its complexity.The merge loop processes each input range by scanning the entire result list, yielding quadratic behavior with many disjoint ranges. A crafted Range header with many small, non-overlapping ranges (or specially shaped numeric substrings) maximizes comparisons.
This affects any Starlette application that uses:
starlette.staticfiles.StaticFiles(internally returnsFileResponse) —starlette/staticfiles.py:178starlette.responses.FileResponseresponsesPoC
Impact
Any Starlette app serving files via FileResponse or StaticFiles; frameworks built on Starlette (e.g., FastAPI) are indirectly impacted when using file-serving endpoints. Unauthenticated remote attackers can exploit this via a single HTTP request with a crafted Range header.
Release Notes
Kludex/starlette (starlette)
v0.49.1: Version 0.49.1Compare Source
This release fixes a security vulnerability in the parsing logic of the
Rangeheader inFileResponse.You can view the full security advisory: GHSA-7f5h-v6xp-fcq8
Fixed
Full Changelog: Kludex/starlette@0.49.0...0.49.1
v0.49.0: Version 0.49.0Compare Source
Added
encodingparameter toConfigclass #2996.Request.cookies#3029.Literaltype forWebSocketEndpointencoding values #3027.Changed
Middlewarewhen usingBaseHTTPMiddleware#2976.New Contributors
Full Changelog: Kludex/starlette@0.48.0...0.49.0
v0.48.0: Version 0.48.0Compare Source
Added
Changed
New Contributors
Full Changelog: Kludex/starlette@0.47.3...0.48.0
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.