Starlette BadHost Flaw Enables Host-Header Auth Bypass in FastAPI and AI Services
Vulnerability Disclosure · 10 sources · Updated 5mo ago · First seen May 26, 2026

A vulnerability in the Python ASGI framework Starlette allows attackers to bypass path-based authentication and authorization checks by sending malformed HTTP Host headers. Tracked as CVE-2026-48710 and dubbed BadHost, the flaw arises because affected Starlette versions reconstruct request.url from unvalidated Host header data, letting characters such as /, ?, or # poison URL parsing. In vulnerable deployments, middleware or application logic may inspect request.url.path as a harmless path while the ASGI router still processes the real protected path, enabling unauthorized access to endpoints such as admin panels, internal tools, and other restricted routes.
The issue affects Starlette versions before 1.0.1 and has broad downstream impact because Starlette underpins FastAPI and many internet-facing AI and API services, including MCP servers, OpenAI-compatible proxies, vLLM, LiteLLM, Ray Serve, BentoML, and related model-management interfaces. Researchers and advisories warned that exposed systems could leak sensitive data, credentials, API keys, and AI compute resources, with some reports noting possible follow-on risks such as SSRF or even RCE where privileged management endpoints are reachable. Starlette 1.0.1 fixes the bug by validating Host headers against RFC requirements and falling back to scope["server"] when malformed values are supplied; defenders were urged to upgrade, audit bundled dependencies, avoid making security decisions from request.url.path, and use scope["path"] or framework-native authorization controls instead.
Why it matters
Impact assessment
CVE-2026-48710 affects Starlette deployments before 1.0.1 and has broad downstream exposure because Starlette underpins FastAPI and many internet-facing API and AI services. The primary impact is unauthorized access to protected endpoints through Host-header manipulation, which can lead to sensitive data exposure, credential theft, abuse of AI compute resources, and follow-on compromise where privileged management functions are reachable.
Affected populations and products
- Starlette versions prior to 1.0.1
- FastAPI applications that inherit Starlette request handling
- AI and API infrastructure built on Starlette/FastAPI, including:
- vLLM
- LiteLLM
- Ray Serve
- BentoML
- MCP servers and gateways
- OpenAI-compatible proxies
- Text Generation Inference integrations mentioned in reporting
- Agent harnesses, eval dashboards, and model-management interfaces
- Deployments directly exposed via uvicorn, hypercorn, daphne, or granian are higher risk when not protected by a compliant reverse proxy
Severity and business impact
- Authentication and authorization bypass can expose admin panels, internal tools, model/runtime control surfaces, key-management endpoints, metrics, shutdown routes, and other restricted paths
- Potential consequences include:
- sensitive data leakage
- API key and credential theft
- unauthorized use of AI inference or compute resources
- tenant/workspace boundary bypass
- operational disruption if management or shutdown endpoints are exposed
- reputational and financial impact from data exposure or service abuse
- Multiple sources state the practical risk may exceed the published CVSS because exploitation is simple and impacts common middleware patterns
Scope and exploitation status
- Scope is broad rather than narrowly targeted because the flaw is in a foundational Python web framework with extensive downstream adoption
- Exposure is concentrated in applications that make security decisions from request.url or request.url.path rather than the raw ASGI path
- Public reporting describes exploitation as trivial on directly exposed systems, but the provided references do not confirm active exploitation in the wild
- OSTIF disclosed expanded details due to slow patch adoption and discovery of additional vulnerable internet-exposed services


