Encode has a security flaw
Starlette, a web toolkit used to build Python web apps and APIs, let attackers dodge login and access checks. A malformed Host header could trick the app into checking the wrong web address path, letting requests slip past security rules meant to block them.
- Severity
- MediumCVSS 3.1 · 6.5
- Fix
- Fixed in 1.0.1Fix recorded on Aug 26, 2026
- Affected versions
- before 1.0.1
- Weakness
- CWE-444HTTP Request Smuggling
- Exploit likelihood
- 36% in 30 daysEPSS, higher than 98% of known flaws
- Affects
- Starlette
- Exploited
- Yes, in the wildListed by CISA
- Added to CISA list
- Sep 2, 2026
- Federal fix deadline
- Sep 16, 2026
How it works
An attacker sends a request with a deliberately broken Host header, and Starlette used that header, instead of the real requested path, to rebuild the web address it checked security rules against, so the path it protected did not match the path it actually served.
What to do
Check your installed Starlette version with python3 -m pip show starlette and see if your app's middleware or endpoints restrict access based on request.url.path rather than the raw request path. If you rely on FastAPI, check which Starlette version it pulled in, since FastAPI depends on it directly.
Run this in the application environment you want to check:
python3 -m pip show starletteUpgrade to Starlette 1.0.1 or later with python3 -m pip install -U starlette, which validates the Host header and falls back to safe server info when it looks malformed. Review any middleware that trusts request.url for security decisions.
Technical details
Starlette's routing used the raw ASGI scope path, but request.url was reconstructed from the client-supplied Host header without validation against RFC 9112 section 3.2 or RFC 3986 section 3.2.2 grammar. A malformed Host header could desynchronize request.url.path from the path actually routed, so middleware or endpoints that gate access on request.url.path (CWE-444, request smuggling-style inconsistency, and CWE-1289, improper input validation) could be bypassed. Fixed in 1.0.1 by validating the Host header and falling back to scope["server"] when it fails validation. Dubbed BadHost by X41 D-Sec, discovered during an OSTIF-sponsored audit.
Severity breakdown
- Attack vector Network Requires network access to the vulnerable service
- Attack complexity Low Low complexity under the assessed conditions
- Privileges required None Attacker needs no account or login
- User interaction None No victim action needed
- Scope Unchanged Impact stays within the same security authority
- Confidentiality impact Low Some data can be read
- Integrity impact Low Some data can be modified
- Availability impact None No availability impact
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N Open in FIRST.org calculatorReferences
- badhost.org Mitigation Third Party Advisory
- github.com · commit 764dab0 Patch
- ostif.org · disclosing-the-badhost-vulnerability-in-starlette Mitigation Third Party Advisory
- secwest.net · starlette Exploit Mitigation Third Party Advisory
- x41-dsec.de · x41-2026-002-starlette Exploit Mitigation Third Party Advisory
- github.com · GHSA-86qp-5c8j-p5mr Vendor Advisory
- github.com · PYSEC-2026-161.yaml (main) Third Party Advisory
- access.redhat.com · RHSA-2026:22992 vendor advisory
- access.redhat.com · RHSA-2026:22993 vendor advisory
- access.redhat.com · RHSA-2026:23346 vendor advisory
- access.redhat.com · RHSA-2026:24866 vendor advisory
- access.redhat.com · RHSA-2026:26226 vendor advisory
- tenable.com · CVE-2026-48710 third party advisory vdb entry
- cvefeed.io · CVE-2026-48710 third party advisory vdb entry
- osv.dev · CVE-2026-48710 vdb entry
- access.redhat.com · RHSA-2026:30088 third party advisory
- access.redhat.com · RHSA-2026:30089 third party advisory
- access.redhat.com · RHSA-2026:34456 third party advisory
- access.redhat.com · RHSA-2026:34526 third party advisory
- access.redhat.com · RHSA-2026:34532 third party advisory
- access.redhat.com · RHSA-2026:37275 third party advisory
- access.redhat.com · RHSA-2026:43038 third party advisory
- access.redhat.com · RHSA-2026:44696 third party advisory
- access.redhat.com · RHSA-2026:51357 third party advisory
- access.redhat.com · CVE-2026-48710 third party advisory
- bugzilla.redhat.com · show_bug.cgi third party advisory
- security.access.redhat.com · cve-2026-48710.json third party advisory