Litestar: AllowedHostsMiddleware bypasses host validation via client-controlled X-Forwarded-Host header
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- High
- Impact type
- —
- Confidentiality · integrity · availability
- None · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.
Summary
Litestar is an Asynchronous Server Gateway Interface (ASGI) framework. In versions prior to 2.22.0, an attacker can bypass the allowed hosts validation by omitting the Host header and supplying an X-Forwarded-Host header set to a whitelisted domain. The AllowedHostsMiddleware trusts the X-Forwarded-Host header as a fallback when the Host header is absent. Since X-Forwarded-Host is a client-controllable header, this enables host header injection attacks such as password reset poisoning, cache poisoning, and server-side request routing manipulation. Any application using AllowedHostsConfig is affected when deployed without a reverse proxy that strips X-Forwarded-Host, or when accepting HTTP/1.0 connections. This issue has been fixed in version 2.22.0.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| litestar-org | litestar | before 2.22.0 | 2.22.0 | Patch available | CNA |
| — | litestar (PyPI) | before 2.22.0 | 2.22.0 | Patch available | GHSA-3qmc-cj7q-62hv |
- litestar Vendorlitestar-org Affected before 2.22.0 Fixed in 2.22.0 Patch available CNA
- litestar (PyPI) Vendor— Affected before 2.22.0 Fixed in 2.22.0 Patch available GHSA-3qmc-cj7q-62hv
CPE names Threatist (inferred) · 1
Inferred from how NVD named this product before; not given by a source.
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:litestar:litestar:*:*:*:*:*:*:*:* | — | — | litestar-org |
- cpe:2.3:a:litestar:litestar:*:*:*:*:*:*:*:* Versions — — ·litestar-org
Remediation
- Fix · CNA litestar (litestar-org) Fixed in 2.22.0
- Fix · GHSA-3qmc-cj7q-62hv litestar (PyPI) Fixed in 2.22.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-48061
- 2026-10-03 Alias added: GHSA-3qmc-cj7q-62hv
References
More litestar-org vulnerabilities
- TI-2024-21848 Litestar and Starlite affected by Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') CVSS 3.1HIGH 8.2
- TI-2024-35241 Litestar allows unbounded resource consumption (DoS vulnerability) CVSS 4.0HIGH 8.2
- TI-2025-36757 X-Forwarded-For Header Spoofing Bypasses Litestar Rate Limiting CVSS 3.1HIGH 7.5
- TI-2026-35501 Litestar: HTML Injection Through CSRF Token CVSS 3.1HIGH 8.1
- TI-2024-28356 Litestar repository vulnerable to Environment Variable injection in `docs-preview.yml` workflow CVSS 3.1HIGH 8.3
- TI-2026-20591 FileStore key canonicalization collisions allow response cache mixup/poisoning (ASCII ord + Unicode NFKD) CVSS 3.1MEDIUM 6.5
Sources
- CVE-2026-48061 · CVE Program
- CVE-2026-48061 · NVD
- FIRST EPSS
- GHSA-3qmc-cj7q-62hv · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences