CVE-2026-48710: Starlette has missing Host header validation that poisons request.url.path, bypassing path-based security checks
Summary In affected versions, the HTTP Host request header was not validated before being used to reconstruct request.url. Because the routing algorithm relies on the raw HTTP path while request.url is rebuilt from the Host header, a malformed header could make request.url.path differ from the path that was actually requested.
Published Jun 4, 2026 · Updated Aug 28, 2026
Affected packages
starlette
- Ecosystem
- PyPI
- Affected
- <= 1.0.0
- Fixed in
- 1.0.1
- Check
pip show starlette
Required action
Apply mitigations in accordance with vendor instructions, ensuring compliance with CISA’s BOD 26-04 Prioritizing Security Updates Based on Risk (see URL in Notes) guidance and CISA’s “Forensics Triage Requirements” (see URL in Notes). Follow applicable BOD 26-04 guidance for cloud services or discontinue use of the product if mitigations are unavailable. Stakeholders are responsible for evaluating each asset's internet exposure and ensuring adherence to BOD 26-04 patching guidelines.
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
In affected versions, the HTTP Host request header was not validated before being used to reconstruct request.url. Because the routing algorithm relies on the raw HTTP path while request.url is rebuilt from the Host header, a malformed header could make request.url.path differ from the path that was actually requested. Middleware and endpoints that apply security restrictions based on request.url (rather than the raw scope path) could therefore be bypassed.
Details
When a client requests http://example.com/foo, it sends:
GET /foo HTTP/1.1
Host: example.comAffected versions reconstructed the URL by concatenating http://{host}{path} and re-parsing the result. The Host value is only valid as a uri-host [ ":" port ] per RFC 9112 §3.2, where uri-host follows the restricted host grammar of RFC 3986 §3.2.2. When it contains characters outside that grammar - notably /, ?, or # - those characters move the path/query/fragment boundaries during re-parsing, so the parsed request.url.path no longer matches the path the server actually received. For example:
GET /foo HTTP/1.1
Host: example.com/abc?bar=reconstructs to http://example.com/abc?bar=/foo, whose parsed path is /abc - even though routing used the real path /foo. The router still dispatches to /foo and the endpoint executes, but any middleware or code that reads request.url.path sees /abc, so path-based authorization checks can be bypassed.
Impact
Any application running an affected version that relies on request.url (or request.url.path) for security-sensitive decisions is affected. The most common case is middleware that gates access to certain path prefixes based on request.url.path. Deployments fronted by a proxy or load balancer are mitigated only if that proxy rejects or normalizes the malformed Host header before forwarding and the application does not trust attacker-controlled host headers (e.g. X-Forwarded-Host) elsewhere.
Mitigation
Upgrade to a patched version, which validates the Host header against the grammar of RFC 9112 §3.2 / RFC 3986 §3.2.2 when constructing request.url and falls back to scope["server"] for malformed values.
Credited to x41j, ehhthing, nic-lovin.
References
- https://github.com/Kludex/starlette/security/advisories/GHSA-86qp-5c8j-p5mr
- https://nvd.nist.gov/vuln/detail/CVE-2026-48710
- https://github.com/Kludex/starlette/commit/764dab0dcfb9033d75442d7a359645c9f94648c6
- https://badhost.org
- https://github.com/pypa/advisory-database/tree/main/vulns/starlette/PYSEC-2026-161.yaml
- https://ostif.org/disclosing-the-badhost-vulnerability-in-starlette
- https://www.secwest.net/starlette
- https://www.x41-dsec.de/lab/advisories/x41-2026-002-starlette
- https://www.cve.org/CVERecord?id=CVE-2026-48710
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-48710.json
- https://bugzilla.redhat.com/show_bug.cgi?id=2481742
- https://access.redhat.com/security/cve/CVE-2026-48710
- https://access.redhat.com/errata/RHSA-2026:34532
- https://access.redhat.com/errata/RHSA-2026:34526
- https://access.redhat.com/errata/RHSA-2026:34456
- https://access.redhat.com/errata/RHSA-2026:30089
- https://access.redhat.com/errata/RHSA-2026:30088
- https://access.redhat.com/errata/RHSA-2026:26226
- https://access.redhat.com/errata/RHSA-2026:24866
- https://access.redhat.com/errata/RHSA-2026:23346
- https://access.redhat.com/errata/RHSA-2026:22993
- https://access.redhat.com/errata/RHSA-2026:22992
- https://access.redhat.com/errata/RHSA-2026:37275
- https://access.redhat.com/errata/RHSA-2026:43038
- https://access.redhat.com/errata/RHSA-2026:44696
- https://access.redhat.com/errata/RHSA-2026:51357
- https://access.redhat.com/errata/RHSA-2026:60520
- https://github.com/advisories/GHSA-86qp-5c8j-p5mr
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
Coverage on the Beam blog
- OpenRouter Data Processing Incidents: Providers Off-boarded and ZDR Labels Pulled
- Dragos AI Supply Chain Study: 2M Canary Prompts Show Router Leaks
- Apache Roller CVE-2026-129448: CISA KEV XML-RPC Deserialization RCE
- LiteLLM CVE-2026-42271 and Starlette BadHost: Active Scanning for Unauthenticated RCE
- LiteLLM CVE-2026-40217: CISA KEV Guardrail Sandbox RCE in the Proxy
More PyPI vulnerabilities
All PyPI entriesCVE-2026-48817
Starlette: Arbitrary HTTP method dispatched to `HTTPEndpoint` attributes via `getattr`
medium5.3Jun 15, 2026CVE-2026-48818
Starlette: SSRF and NTLM credential theft via UNC paths in StaticFiles on Windows
high7.5Jun 15, 2026CVE-2026-54283
Starlette: request.form() limits silently ignored for application/x-www-form-urlencoded enable DoS
high7.5Jun 15, 2026CVE-2025-62727
Starlette vulnerable to O(n^2) DoS via Range header merging in ``starlette.responses.FileResponse``
high7.5Oct 28, 2025CVE-2025-54121
Starlette has possible denial-of-service vector when parsing large files in multipart forms
medium5.3Jul 21, 2025CVE-2024-47874
Starlette Denial of service (DoS) via multipart/form-data
high8.7Oct 15, 2024
