Semgrep: Starlette has missing Host header validation that poisons request.url.path, bypassing path-based security
Affects semgrepSource GCVE Database
Exploited in the wild · KEV due 16 Sep 2026 · public detection template (Nuclei) : upgrade to 1.165.0 now.
Data as of 31 Oct 2026, 16:23 UTC
- KEV deadline
- US federal agencies must patch by this date; a sensible deadline for everyone else. Other KEV due dates
- Patch
- Available – fixed in 1.165.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:NExploitation evidence
t = 0 is the CVE’s publication on cve.org
Disclosed: evidence found.
CVE published 26 May 2026
Detectable: evidence found.
nuclei template: Starlette - Improper Validation of Unsafe Equivalence in Input
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: evidence found.
Listed in CISA KEV 99 days after disclosure
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
Timeline
CVE ID reserved
by GitHub, Inc.
, 4 days before disclosure
CVE published
on cve.org
, t = 0
In Threat Radar
record ingested
, 24 minutes after disclosure
Added to CISA KEV (opens in a new tab)
exploitation confirmed
, 99 days after disclosure
KEV remediation due
US federal deadline
, 113 days after disclosure
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), CISA KEV (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 30 Oct 2026.
What to do
Upgrade semgrep to 1.165.0.
Patches and advisories
- access.redhat.com/errata/RHSA-2026:60520 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:51357 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:44696 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:43038 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:37275 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:34532 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:34526 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:34456 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:30089 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:30088 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:26226 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:24866 (opens in a new tab)
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Homebrewsemgreppkg:brew/semgrepOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade to Starlette version 1.165.0 or later, which includes validation of the Host header per RFC 9112 and RFC 3986 and falls back to the server scope for malformed Host headers. Alternatively, deploy an RFC-compliant reverse proxy (e.g., nginx, Apache, HAProxy, Caddy) in front of the ASGI server to reject malformed Host headers before they reach the application. Review application code to ensure security decisions do not rely on request.url.path but instead use the canonical ASGI path or standard framework mechanisms.
Description
Starlette versions from 1.137.0 up to but not including 1.165.0 improperly validate the HTTP Host header when reconstructing request.url, allowing a malformed Host header to cause request.url.path to differ from the actual requested path. This discrepancy can lead to bypass of path-based security checks if middleware or endpoints rely on request.url.path rather than the canonical ASGI path. The vulnerability does not directly grant access or modify routing but can enable bypass only if applications depend on the flawed request.url.path for authorization. The issue is mitigated by validating the Host header per RFC 9112 and falling back to server scope for malformed values. A fix is available in version 1.165.0.
References
- github.com/Kludex/starlette/security/advisories/GHSA-86qp-5c8j-p5mr (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-48710 (opens in a new tab)
- github.com/Kludex/starlette/commit/764dab0dcfb9033d75442d7a359645c9f94648c6 (opens in a new tab)
- x41-dsec.de/lab/advisories/x41-2026-002-starlette (opens in a new tab)
- secwest.net/starlette (opens in a new tab)
- cve.org/CVERecord?id=CVE-2026-48710 (opens in a new tab)
- security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-48710.json (opens in a new tab)
- ostif.org/disclosing-the-badhost-vulnerability-in-starlette (opens in a new tab)
- github.com/pypa/advisory-database/tree/main/vulns/starlette/PYSEC-2026-161.yaml (opens in a new tab)
- github.com/Kludex/starlette (opens in a new tab)
- bugzilla.redhat.com/show_bug.cgi?id=2481742 (opens in a new tab)
- badhost.org (opens in a new tab)
- access.redhat.com/security/cve/CVE-2026-48710 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:60520 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:51357 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:44696 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:43038 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:37275 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:34532 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:34526 (opens in a new tab)