—
PYSEC-2026-161
BadHost: Missing Host header validation poisons request.url.path, bypassing path-based security checks
상세
Starlette reconstructs the requested URL based on the HTTP Host request header and requested path, but does not perform any validation of the Host header value. This allows attackers to inject paths into the host part, prepending the actual path. However, routing in Starlette is based on the actual request path. This inconsistent interpretation of HTTP requests may lead to issues such as authentication bypass when the authentication depends on the reconstructed URL’s path.
이 버전이 영향받나요?
사용 중인 패키지 버전을 입력하면 즉시 평가합니다.
영향 패키지
참고
- https://badhost.org [ARTICLE]
- https://www.secwest.net/starlette [ARTICLE]
- https://ostif.org/disclosing-the-badhost-vulnerability-in-starlette/ [ARTICLE]
- https://badhost.org [DETECTION]
- https://github.com/Kludex/starlette/security/advisories/GHSA-86qp-5c8j-p5mr [EVIDENCE]
- https://github.com/Kludex/starlette/security/advisories/GHSA-86qp-5c8j-p5mr [ADVISORY]
- https://www.x41-dsec.de/lab/advisories/x41-2026-002-starlette/ [ADVISORY]
- https://github.com/Kludex/starlette/commit/764dab0dcfb9033d75442d7a359645c9f94648c6 [FIX]