6.5 MEDIUM
- CVSS version (CVSS): 3.1
- Attack Vector (AV): Network (N)
- Attack Complexity (AC): Low (L)
- Privileges Required (PR): None (N)
- User Interaction (UI): None (N)
- Scope (S): Unchanged (U)
- Confidentiality (C): Low (L)
- Integrity (I): Low (L)
- Availability (A): None (N)
- Modified Attack Vector (MAV): Network (N)
- Modified Attack Complexity (MAC): Low (L)
- Modified Privileges Required (MPR): None (N)
- Modified User Interaction (MUI): None (N)
- Modified Confidentiality (MC): Low (L)
- Modified Scope (MS): Unchanged (U)
- Modified Integrity (MI): Low (L)
- Modified Availability (MA): None (N)
Activity log
- Created suggestion
Starlette has missing Host header validation that poisons request.url.path, bypassing path-based security checks
Starlette is a lightweight ASGI framework/toolkit. Prior to version 1.0.1, 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. Users should upgrade to a version greater than or equal to version 1.0.1, 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.
References
-
https://github.com/Kludex/starlette/security/advisories/GHSA-86qp-5c8j-p5mr x_refsource_CONFIRM
-
https://badhost.org x_refsource_MISC
-
https://ostif.org/disclosing-the-badhost-vulnerability-in-starlette x_refsource_MISC
-
https://www.secwest.net/starlette x_refsource_MISC
-
https://www.x41-dsec.de/lab/advisories/x41-2026-002-starlette x_refsource_MISC
Affected products
- ==< 1.0.1
Matching in nixpkgs
pkgs.python312Packages.starlette
Little ASGI framework that shines
pkgs.python313Packages.starlette
Little ASGI framework that shines
pkgs.python314Packages.starlette
Little ASGI framework that shines
pkgs.python312Packages.sse-starlette
Server Sent Events for Starlette and FastAPI
pkgs.python312Packages.starlette-wtf
Simple tool for integrating Starlette and WTForms
pkgs.python313Packages.sse-starlette
Server Sent Events for Starlette and FastAPI
pkgs.python313Packages.starlette-wtf
Simple tool for integrating Starlette and WTForms
pkgs.python314Packages.sse-starlette
Server Sent Events for Starlette and FastAPI
pkgs.python314Packages.starlette-wtf
Simple tool for integrating Starlette and WTForms
pkgs.python312Packages.starlette-admin
Fast, beautiful and extensible administrative interface framework for Starlette & FastApi applications
pkgs.python313Packages.starlette-admin
Fast, beautiful and extensible administrative interface framework for Starlette & FastApi applications
pkgs.python314Packages.starlette-admin
Fast, beautiful and extensible administrative interface framework for Starlette & FastApi applications
pkgs.python312Packages.starlette-context
Middleware for Starlette that allows you to store and access the context data of a request
pkgs.python313Packages.starlette-context
Middleware for Starlette that allows you to store and access the context data of a request
pkgs.python314Packages.starlette-context
Middleware for Starlette that allows you to store and access the context data of a request
pkgs.python312Packages.starlette-compress
Compression middleware for Starlette - supporting ZStd, Brotli, and GZip
pkgs.python313Packages.starlette-compress
Compression middleware for Starlette - supporting ZStd, Brotli, and GZip
pkgs.python314Packages.starlette-compress
Compression middleware for Starlette - supporting ZStd, Brotli, and GZip
Package maintainers
-
@fabaff Fabian Affolter <mail@fabian-affolter.ch>
-
@wd15 Daniel Wheeler <daniel.wheeler2@gmail.com>
-
@pbsds Peder Bergebakken Sundt <pbsds@hotmail.com>
-
@wrvsrx wrvsrx <wrvsrx@outlook.com>
-
@Zaczero Kamil Monicz <kamil@monicz.dev>
-
@n0emis Ember Keske <nixpkgs@n0emis.network>
-
@yuyuyureka Yureka <yuka@yuka.dev>
-
@johannwagner Johann Wagner <nix@wagner.digital>