CVE-2026-48710: 
Python vulnerability analysis and mitigation

Overview

CVE-2026-48710, dubbed "BadHost", is a Host header validation bypass vulnerability in the Starlette ASGI framework for Python. Prior to version 1.0.1, Starlette did not validate the HTTP Host request header before using it to reconstruct request.url, causing a mismatch between the raw HTTP path used by the router and the request.url.path seen by middleware and endpoints. This allows unauthenticated remote attackers to bypass path-based security controls by supplying a malformed Host header. All Starlette versions from 0.1.0 through 1.0.0 (inclusive) are affected, covering a very large number of downstream projects including FastAPI, vLLM, LiteLLM, and MCP SDK deployments. The vulnerability was published on May 26, 2026, with a CVSS v3.1 base score of 6.5 (Medium) (Github Advisory, GHSA-86qp-5c8j-p5mr).

Technical details

The root cause is classified as CWE-444 (Inconsistent Interpretation of HTTP Requests). Starlette reconstructed request.url by concatenating http://{host_header}{path} and re-parsing the result using Python's urlsplit. Because the Host header is only valid as a uri-host [":" port] per RFC 9112 §3.2, injecting characters such as /, ?, or # into the Host value shifts the path/query/fragment boundaries during re-parsing. For example, sending Host: example.com/abc?bar= with a request to /admin causes request.url.path to resolve to /abc while the router still dispatches to /admin — the actual requested path stored in scope["path"]. Any middleware or endpoint that gates access based on request.url.path rather than scope["path"] can therefore be bypassed with a single crafted header. No authentication or special privileges are required; the attack is network-accessible with low complexity (Github Advisory, X41 Advisory).

Impact

Successful exploitation allows an unauthenticated attacker to bypass path-based access controls, gaining unauthorized access to protected endpoints such as admin panels, internal APIs, or sensitive AI agent server endpoints. The confidentiality and integrity impacts are rated low-to-moderate individually, but in practice the bypass can expose sensitive data or allow unauthorized actions on any Starlette-based application that relies on request.url for security decisions. The vulnerability is particularly impactful in AI infrastructure: frameworks such as FastAPI, LiteLLM, vLLM, and MCP SDK all depend on Starlette, and reports indicate millions of AI agent deployments were at risk. When chained with other vulnerabilities (e.g., CVE-2026-42271 in LiteLLM), the bypass can escalate to unauthenticated remote code execution (Github Advisory, Horizon3 Research, Rescana Alert).

Exploitability

Multiple high-confidence proof-of-concept exploits are publicly available, including a dedicated lab repository with step-by-step reproduction instructions and specific curl commands (PoC Lab, SecWest Advisory, X41 Advisory). Active exploitation has been reported by multiple sources, and the vulnerability has been chained with CVE-2026-42271 (LiteLLM command injection) in the wild to achieve unauthenticated RCE — a chain that CISA confirmed as actively exploited and added to the KEV catalog (for CVE-2026-42271) (Rescana Alert, SOCRadar KEV). The EPSS score is approximately 0.034–0.353% (58th percentile), and Nessus detection plugins (IDs 316593, 318768, 318780) are available (Github Advisory). No specific threat actor attribution has been publicly reported for CVE-2026-48710 alone.

Exploitation steps

  1. Reconnaissance: Identify internet-facing Starlette-based applications (FastAPI, LiteLLM, vLLM, MCP SDK, etc.) running versions ≤ 1.0.0 using tools like Shodan, Censys, or nuclei templates (a template was submitted to ProjectDiscovery's nuclei-templates repository).
  2. Identify protected path: Determine a path prefix that is protected by middleware or endpoint-level access control relying on request.url.path (e.g., /admin, /internal, /metrics).
  3. Craft malformed Host header: Construct a Host header containing characters outside the RFC 3986 §3.2.2 grammar — specifically /, ?, or # — such that when Starlette reconstructs request.url, the parsed path differs from the actual requested path. For example: Host: foo? causes request.url.path to appear as an empty or different path.
  4. Send bypass request: Issue an HTTP request to the protected endpoint with the crafted header:
    curl -i -H 'Host: foo?' http://target/admin
    The router dispatches to /admin (the real path), but middleware reads request.url.path as something other than /admin, bypassing the access check.
  5. Access protected resource: Receive a 200 OK response with the protected content instead of the expected 403 Forbidden, confirming the bypass.
  6. Chain for escalation (optional): In LiteLLM deployments, use the authentication bypass to reach an unauthenticated command injection endpoint (CVE-2026-42271) and achieve remote code execution on the host (PoC Lab, X41 Advisory, Horizon3 Research).

Indicators of compromise

  • Network: HTTP requests to protected path prefixes (e.g., /admin, /internal, /metrics) with a Host header containing characters such as ?, #, /, @, or spaces (e.g., Host: foo?, Host: example.com/abc?bar=); unexpected 200 OK responses to requests that should return 403 Forbidden.
  • Logs: Web server or ASGI access logs showing requests to sensitive endpoints with anomalous Host header values; discrepancy between the requested path in the access log and the path reflected in application-level audit logs.
  • File System (if chained with RCE): Unexpected new files, scripts, or web shells in the application directory; new cron jobs or systemd units created by the application service account.
  • Process (if chained with RCE): Unusual child processes spawned by the Python/uvicorn process (e.g., bash, sh, curl, wget, python -c).
  • Scanning: Nuclei scan hits from ProjectDiscovery template for CVE-2026-48710; Nessus plugin IDs 316593, 318768, 318780 flagging vulnerable Starlette versions (Github Advisory).

Mitigation and workarounds

Primary remediation: Upgrade Starlette to version 1.0.1 or later, which validates the Host header against RFC 9112 §3.2 / RFC 3986 §3.2.2 grammar and falls back to scope["server"] for malformed values (GHSA-86qp-5c8j-p5mr, Patch Commit). FastAPI and other Starlette-dependent frameworks should also be updated to versions that pull in the patched Starlette. Workarounds (if immediate upgrade is not possible): (1) Ensure all security controls validate scope["path"] directly rather than request.url.path; (2) Deploy a reverse proxy or WAF that rejects or normalizes malformed Host headers before forwarding to the application; (3) Ensure the application does not trust attacker-controlled headers such as X-Forwarded-Host. Red Hat has issued errata RHSA-2026:22993 and RHSA-2026:23346 for affected products (Red Hat CVE).

Community reactions

The vulnerability received significant attention under the name "BadHost", with dedicated coverage from OSTIF (who disclosed the finding), X41 D-Sec (who authored the original advisory), and SecWest (OSTIF Disclosure, X41 Advisory). Media coverage highlighted the broad impact on AI infrastructure, with outlets such as CSO Online, Risky Biz, GBHackers, and CyberSecurityNews noting that millions of AI agent deployments using FastAPI, LiteLLM, vLLM, and MCP SDK were potentially exposed (Risky Biz, CSO Online). The Starlette maintainer (Marcelo Tryle) published a perspective post on the vulnerability, and the issue generated active discussion on Hacker News, Reddit, and Lobsters. Belgium's CCB issued a formal warning, and CERT.at included it in daily security briefings (CCB Warning).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

starlette: 0.26.1-1+deb12u1

Fixed

sid

starlette: 1.1.0-1

Fixed

trixie

starlette: 0.46.1-3+deb13u2

Fixed

Ubuntu

Unknown

devel

starlette

Unknown

jammy

starlette

Unknown

jammy (esm-apps)

starlette

Unknown

noble

starlette

Unknown

noble (esm-apps)

starlette

Unknown

resolute

starlette

Unknown

resolute (esm-apps)

starlette

Unknown

RHEL / CentOS

Unknown

Alpine

Fixed

edge

py3-starlette: 1.1.0-r0

Fixed

Source: This report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-57496CRITICAL9.6
  • Python logoPython
  • netlicensing-mcp
NoYesOct 15, 2026
CVE-2026-55787HIGH7.1
  • Python logoPython
  • flyto-core
NoYesOct 14, 2026
CVE-2026-62322MEDIUM6.5
  • Python logoPython
  • social-auth-core
NoYesOct 15, 2026
CVE-2026-104266MEDIUM6.5
  • Python logoPython
  • tinytag
NoYesOct 15, 2026
CVE-2026-68549LOW3.3
  • Python logoPython
  • clickmigrate
NoYesOct 16, 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