CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-48710

CVE-2026-48710: Starlette BadHost HTTP Host-Header Path-Poisoning and Authentication Bypass

Amit Schendel
Amit Schendel
Senior Security Researcher

Jun 4, 2026·7 min read·8 visits

Executive Summary (TL;DR)

A validation flaw in Starlette's Host header parsing enables attackers to bypass security middleware checks. By adding characters like '?' or '#' to the Host header, the framework miscalculates the request path as '/' (public) while the router still executes the actual targeted administrative endpoint.

CVE-2026-48710 is a critical security-desynchronization vulnerability in the Starlette ASGI framework (versions >= 0.8.3, < 1.0.1) that allows remote attackers to bypass path-based security middleware and access-control decorators. By injecting URI authority-to-path delimiters into the Host header, attackers can manipulate the application-level parsed URL path while the underlying ASGI server dispatches the request to target endpoints.

Vulnerability Overview

The Starlette Asynchronous Server Gateway Interface (ASGI) framework is a foundational toolkit for high-performance Python web applications. It serves as the primary engine for FastAPI, LiteLLM, vLLM, and numerous Model Context Protocol (MCP) server implementations. The framework's architecture depends on parsing and reconstructing incoming HTTP requests to expose unified request attributes, including request.url and request.url.path, to application-level logic.

Path-based security middleware and decorators routinely inspect request.url.path to enforce authentication, authorization, and tenant isolation policies. If an application restricts access to paths like /admin or /metrics, the middleware verifies the incoming path against these specific routes before routing. This architecture assumes that the path analyzed by the middleware is identical to the path evaluated by the downstream router.

CVE-2026-48710 exposes a design flaw where this assumption fails. The framework fails to validate the characters within the client-controlled Host HTTP header before constructing the absolute URL object. This oversight allows attackers to inject URL authority-to-path delimiters, causing a parser differential between the application's security middleware and its internal routing engine.

The vulnerability is classified under CWE-444 (Inconsistent Interpretation of HTTP Requests), CWE-1289 (Improper Validation of Unsafe Equivalence in Input), and CWE-436 (Inconsistent Interpretation of HTTP Requests). It represents a critical architectural vulnerability because it bypasses centralized security controls without requiring credentials or complex multi-stage payloads.

Root Cause Analysis

The root cause of CVE-2026-48710 resides in starlette/datastructures.py during the reconstruction of the client's absolute request URL. To build the URL object, Starlette reads the incoming request headers to extract the Host value. It then concatenates this raw, unvalidated Host header string with the ASGI scheme and the raw request path extracted from the ASGI scope.

The concatenation is performed using a basic format string: url = f"{scheme}://{host_header}{path}". The resulting string is subsequently passed to Python's standard urllib.parse.urlsplit function to instantiate the parsed URL object. Under RFC 3986, a valid Host header represents the authority and must only contain valid hostname characters, dots, colons, and digits for port specification.

When an attacker provides a malformed Host header containing URL authority-to-path delimiters (such as /, ?, or #), the standard Python URL parser is desynchronized. For example, if the Host header is target.com? and the request path is /admin, the concatenated string becomes http://target.com?/admin. The urlsplit function interprets the ? character as the beginning of the query string. Consequently, it parses the authority (netloc) as target.com, the path as /, and the query string as /admin.

This structural misinterpretation creates a parser differential. The security middleware queries request.url.path and receives /, concluding that the request is targeting the public root directory. Concurrently, the ASGI router routes the request based on the unmanipulated, raw ASGI scope['path'], which remains /admin. This dual-interpretation pipeline allows unauthorized requests to reach gated endpoints.

Code Analysis and Patch Walkthrough

An examination of the vulnerable code in starlette/datastructures.py highlights the absence of validation prior to URL construction:

# Vulnerable URL construction in starlette/datastructures.py
host_header = None
for key, value in scope.get("headers", []):
    if key == b"host":
        host_header = value.decode("latin-1")
        break
 
if host_header is not None:
    # Raw concatenation allowing arbitrary injection in the host_header string
    url = f"{scheme}://{host_header}{path}"
elif server is None:
    url = path

The official security patch introduced in commit 764dab0dcfb9033d75442d7a359645c9f94648c6 mitigates this flaw by implementing a strict regular expression validation step. The validation regex ensures that only RFC-compliant characters are present in the Host header before any concatenation takes place:

# Patched implementation in starlette/datastructures.py
import re
 
# Regex to reject Host header chars (/, ?, #, @, etc.) that modify urlsplit outcomes
_HOST_RE = re.compile(r"^([a-z0-9.-]+|\[[a-f0-9]*:[a-f0-9.:]+\])(?::[0-9]+)?$", re.IGNORECASE)
 
# ... inside URL class construction
            if host_header is not None and _HOST_RE.fullmatch(host_header):
                url = f"{scheme}://{host_header}{path}"
            elif server is None:
                url = path

If the Host header contains characters that do not match the _HOST_RE pattern, the application discards the host_header and falls back to using the ASGI-provided server tuple. This ensures that the constructed request.url.path correctly reflects the actual request path, eliminating the logic desynchronization.

This fix is robust because it relies on strict allow-listing rather than block-listing. By restricting the permitted character set to standard domain characters, IPv4/IPv6 addresses, and optional numeric port suffixes, it structurally prevents any delimiter-injection attack variants.

Exploitation Methodology

Exploitation of CVE-2026-48710 requires no authentication and can be completed in a single HTTP request. The prerequisites are an application utilizing a vulnerable version of Starlette (or downstream FastAPI), and the deployment of path-based security middleware that evaluates access permissions using request.url.path rather than the raw ASGI scope['path'].

An attacker crafts an HTTP request where the target endpoint is specified in the request line, but the Host header is modified to include a trailing delimiter character. The following text-based sequence diagram illustrates the flow of the attack:

When sending the payload GET /admin HTTP/1.1 with Host: target.com?, the ASGI server populates the routing table with /admin. The Starlette middleware intercepts this request, reconstructs the URL as http://target.com?/admin, and parses the path as /. The middleware permits the request because / is configured as a public path. The request is then dispatched to the /admin handler, which executes and returns the privileged response.

Alternative delimiters such as # or / can also be exploited depending on the specific reverse-proxy or ASGI server configuration. Security scanners can detect this by validating the response differences between standard queries and modified Host header queries.

Impact Assessment

The impact of CVE-2026-48710 is critical for multi-tenant systems, administrative interfaces, and AI/LLM deployment pipelines. Because Starlette is the foundational dependency of FastAPI, any FastAPI application employing path-based authentication middleware is vulnerable to complete authentication bypass.

In modern Large Language Model (LLM) infrastructures using vLLM or LiteLLM, administrative endpoints often manage model loading, hardware allocation, prompt configurations, and tool execution. Bypassing access controls on these endpoints allows remote attackers to execute arbitrary system evaluations, modify models, or extract sensitive datasets.

This vulnerability has been assigned a CVSS v4.0 Base Score of 7.0 (High Severity) with the vector CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N. The CVSS v3.1 rating is 6.5 (Medium Severity). While the base severity is high, the absolute risk depends on whether the application relies on path-based middleware for security boundaries.

Because Starlette is embedded deep within downstream packages, many organizations are unaware that their running containers house the vulnerable parsing logic. The exploit requires minimal technical complexity, and public scanner scripts are already weaponized, increasing the likelihood of targeted scanning.

Defensive Strategies and Remediation

The primary remediation strategy is upgrading the Starlette library to version 1.0.1 or higher. For downstream applications like FastAPI, ensuring that Starlette is updated in the application's environment is sufficient, as FastAPI inherits Starlette's request-handling components.

For environments where library upgrades are delayed due to legacy dependency pinning, developers should modify custom middleware to read the raw, unmanipulated ASGI path directly instead of using the constructed URL path. Replacing request.url.path with request.scope["path"] in authorization checks ensures that the middleware evaluates the exact path that the router will ultimately execute.

Deploying a reverse proxy or Web Application Firewall (WAF) in front of the ASGI application provides immediate perimeter protection. Standard configurations in Nginx, Cloudflare, or AWS Application Load Balancers (ALB) naturally reject invalid characters within the Host header and terminate the connection before it reaches the Python application server.

Organizations should configure network-level ingress filters to ensure that direct access to the ASGI server (e.g., Uvicorn or Hypercorn) is blocked from external networks. ASGI servers should only bind to the local loopback interface (127.0.0.1), forcing all external traffic to pass through a sanitizing reverse proxy.

Official Patches

Starlette (GitHub Security Advisory)Official Security Advisory for CVE-2026-48710 in Starlette.

Fix Analysis (1)

Technical Appendix

CVSS Score
7.0/ 10
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N
EPSS Probability
0.35%
Top 42% most exploited

Affected Systems

Starlette ASGI framework (versions >= 0.8.3, < 1.0.1)FastAPI applications using path-based security middlewareLiteLLM and vLLM infrastructures deployed on vulnerable Starlette versionsModel Context Protocol (MCP) server implementations running on Starlette

Affected Versions Detail

Product
Affected Versions
Fixed Version
Starlette
Encode
>= 0.8.3, < 1.0.11.0.1
FastAPI
Tiangolo
<= 0.115.xDependent on Starlette 1.0.1
AttributeDetail
CWE IDCWE-1289
Attack VectorNetwork (AV:N)
CVSS v4.0 Score7.0 (High Severity)
EPSS Score0.00353 (0.35%)
ImpactAuthentication and Authorization Bypass
Exploit StatusProof-of-Concept (PoC) public, scanner code weaponized
KEV StatusNot listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1556Modify Authentication Process
Credential Access
CWE-1289
Improper Validation of Unsafe Equivalence in Input

The application does not properly validate or normalize inputs, leading to inconsistent interpretations of equivalent paths or identifiers.

Known Exploits & Detection

GitHubExploit and vulnerability scanning utility targeting the BadHost CVE-2026-48710 logic gap.

References & Sources

  • [1]Official Starlette GitHub Advisory
  • [2]Official Security Fix Commit
  • [3]X41 D-Sec Lab Security Advisory
  • [4]OSTIF Disclosure & Deep-Dive Warning
  • [5]CVE Record (CVE.org)
  • [6]PyPA PYSEC Tracker
  • [7]BadHost Exploit & Scanner Repository
  • [8]Dedicated Threat Portal
  • [9]SecWest Starlette Portal
  • [10]Wiz Vulnerability Analysis Entry

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•11 minutes ago•CVE-2026-34077
7.5

CVE-2026-34077: Denial of Service and Unsafe Deserialization in React Router Single Fetch

React Router and the underlying turbo-stream vendor library contain a vulnerability allowing remote unauthenticated attackers to trigger a Denial of Service (DoS) or potentially client-side Cross-Site Scripting (XSS) due to unsafe dynamic deserialization of streaming error payloads.

Amit Schendel
Amit Schendel
0 views•6 min read
•41 minutes ago•CVE-2026-47707
5.3

CVE-2026-47707: GraphQL Alias Amplification Bypass in Strawberry GraphQL MaxAliasesLimiter

A security flaw in strawberry-graphql versions 0.172.0 through 0.315.6 allows unauthenticated attackers to bypass the MaxAliasesLimiter extension. By utilizing GraphQL fragment spreads, clients can trigger high levels of alias amplification, causing uncontrolled backend resource consumption and application-level Denial of Service.

Amit Schendel
Amit Schendel
1 views•5 min read
•about 3 hours ago•CVE-2026-20230
8.6

CVE-2026-20230: Server-Side Request Forgery in Cisco Unified Communications Manager WebDialer Service

CVE-2026-20230 is a critical Server-Side Request Forgery (SSRF) vulnerability in the WebDialer service of Cisco Unified Communications Manager (Unified CM) and Cisco Unified Communications Manager Session Management Edition (Unified CM SME). The flaw arises from improper validation of input parameters within WebDialer HTTP requests. Unauthenticated remote attackers can exploit this vulnerability to force the application to make HTTP requests to internal administrative services bound to the loopback interface. In the Cisco Voice Operating System (VOS) environment, these local services trust loopback traffic inherently, permitting unauthorized file writes. By writing malicious files to specific system directories, the attacker can execute arbitrary commands with root privileges.

Alon Barad
Alon Barad
9 views•6 min read
•about 8 hours ago•CVE-2026-48526
7.4

CVE-2026-48526: Algorithm Confusion Vulnerability in PyJWT

CVE-2026-48526 is an algorithm-confusion vulnerability in PyJWT prior to version 2.13.0. When an application decodes tokens using a raw JSON Web Key (JWK) string while simultaneously supporting mixed algorithm families (symmetric and asymmetric), PyJWT does not validate that the key matches its intended algorithm context. This allows an attacker to sign a forged token using the public JWK string as an HMAC symmetric secret, bypassing authentication controls.

Alon Barad
Alon Barad
5 views•7 min read
•about 9 hours ago•CVE-2026-23479
8.8

CVE-2026-23479: Use-After-Free Vulnerability in Redis Blocking-Client Command Re-Execution

CVE-2026-23479 is a critical Use-After-Free (UAF) vulnerability inside the blocking-client code path of the Redis in-memory data structure server. In affected versions from 7.2.0 until 8.6.3, the unblock client flow fails to handle an error return from processCommandAndResetClient when re-executing a previously blocked command. If a blocked client is evicted due to maxmemory limits or client eviction policies during this command processing flow, its client structure is freed. Because the caller ignores the error return and continues processing, it attempts to read and write properties on the freed client structure, leading to a Use-After-Free condition.

Alon Barad
Alon Barad
13 views•7 min read
•about 15 hours ago•CVE-2026-42211
8.1

CVE-2026-42211: Remote Code Execution via Insecure Deserialization in React Router Framework Mode

A critical vulnerability exists in React Router v7 when running in Framework Mode. The vulnerability arises from insecure deserialization of TYPE_ERROR objects in the internal turbo-stream library, which resolves constructors from the global scope. If an application contains an independent prototype pollution vulnerability, an attacker can trigger unauthenticated Remote Code Execution (RCE) on the server.

Alon Barad
Alon Barad
9 views•5 min read