CVE-2026-48061 Litestar: AllowedHostsMiddleware bypasses host validation via client-controlled X-Forwarded-Host header
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: no · technical impact: partial
Description
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.
Upgrade path
2 packages: 1 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| pypi litestar(PyPI) | < 2.22.0; = 1.0.0a0; = 2.0.0; = 2.0.0a3 +59 more | 2.22.0 | Fixed |
| litestar-org litestar | = < 2.22.0 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| litestar-org litestar | = < 2.22.0 | No fix listed |
| pypi litestar(PyPI) | < 2.22.0 | 2.22.0 |
| pypi litestar(PyPI) | = 1.0.0a0 | No fix listed |
| pypi litestar(PyPI) | = 2.0.0 | No fix listed |
| pypi litestar(PyPI) | = 2.0.0a3 | No fix listed |
| pypi litestar(PyPI) | = 2.0.0a4 | No fix listed |
| pypi litestar(PyPI) | = 2.0.0a5 | No fix listed |
| pypi litestar(PyPI) | = 2.0.0a6 | No fix listed |
| pypi litestar(PyPI) | = 2.0.0a7 | No fix listed |
| pypi litestar(PyPI) | = 2.0.0b1 | No fix listed |
| pypi litestar(PyPI) | = 2.0.0b2 | No fix listed |
| pypi litestar(PyPI) | = 2.0.0b3 | No fix listed |
| pypi litestar(PyPI) | = 2.0.0b4 | No fix listed |
| pypi litestar(PyPI) | = 2.0.0rc1 | No fix listed |
| pypi litestar(PyPI) | = 2.0.1 | No fix listed |
| pypi litestar(PyPI) | = 2.1.0 | No fix listed |
| pypi litestar(PyPI) | = 2.1.1 | No fix listed |
| pypi litestar(PyPI) | = 2.10.0 | No fix listed |
| pypi litestar(PyPI) | = 2.11.0 | No fix listed |
| pypi litestar(PyPI) | = 2.12.0 | No fix listed |
| pypi litestar(PyPI) | = 2.12.1 | No fix listed |
| pypi litestar(PyPI) | = 2.13.0 | No fix listed |
| pypi litestar(PyPI) | = 2.14.0 | No fix listed |
| pypi litestar(PyPI) | = 2.15.0 | No fix listed |
| pypi litestar(PyPI) | = 2.15.1 | No fix listed |
Show 39 more
| Product | Affected versions | Fixed in |
|---|---|---|
| pypi litestar(PyPI) | = 2.15.2 | No fix listed |
| pypi litestar(PyPI) | = 2.16.0 | No fix listed |
| pypi litestar(PyPI) | = 2.17.0 | No fix listed |
| pypi litestar(PyPI) | = 2.18.0 | No fix listed |
| pypi litestar(PyPI) | = 2.19.0 | No fix listed |
| pypi litestar(PyPI) | = 2.2.0 | No fix listed |
| pypi litestar(PyPI) | = 2.2.1 | No fix listed |
| pypi litestar(PyPI) | = 2.20.0 | No fix listed |
| pypi litestar(PyPI) | = 2.21.0 | No fix listed |
| pypi litestar(PyPI) | = 2.21.1 | No fix listed |
| pypi litestar(PyPI) | = 2.3.0 | No fix listed |
| pypi litestar(PyPI) | = 2.3.1 | No fix listed |
| pypi litestar(PyPI) | = 2.3.2 | No fix listed |
| pypi litestar(PyPI) | = 2.4.0 | No fix listed |
| pypi litestar(PyPI) | = 2.4.1 | No fix listed |
| pypi litestar(PyPI) | = 2.4.2 | No fix listed |
| pypi litestar(PyPI) | = 2.4.3 | No fix listed |
| pypi litestar(PyPI) | = 2.4.4 | No fix listed |
| pypi litestar(PyPI) | = 2.4.5 | No fix listed |
| pypi litestar(PyPI) | = 2.5.0 | No fix listed |
| pypi litestar(PyPI) | = 2.5.1 | No fix listed |
| pypi litestar(PyPI) | = 2.5.2 | No fix listed |
| pypi litestar(PyPI) | = 2.5.3 | No fix listed |
| pypi litestar(PyPI) | = 2.5.4 | No fix listed |
| pypi litestar(PyPI) | = 2.5.5 | No fix listed |
| pypi litestar(PyPI) | = 2.6.0 | No fix listed |
| pypi litestar(PyPI) | = 2.6.1 | No fix listed |
| pypi litestar(PyPI) | = 2.6.2 | No fix listed |
| pypi litestar(PyPI) | = 2.6.3 | No fix listed |
| pypi litestar(PyPI) | = 2.6.4 | No fix listed |
| pypi litestar(PyPI) | = 2.7.0 | No fix listed |
| pypi litestar(PyPI) | = 2.7.1 | No fix listed |
| pypi litestar(PyPI) | = 2.7.2 | No fix listed |
| pypi litestar(PyPI) | = 2.8.0 | No fix listed |
| pypi litestar(PyPI) | = 2.8.1 | No fix listed |
| pypi litestar(PyPI) | = 2.8.2 | No fix listed |
| pypi litestar(PyPI) | = 2.8.3 | No fix listed |
| pypi litestar(PyPI) | = 2.9.0 | No fix listed |
| pypi litestar(PyPI) | = 2.9.1 | No fix listed |
References
- https://github.com/litestar-org/litestar/security/advisories/GHSA-3qmc-cj7q-62hv exploit vendor-advisory
- https://github.com/litestar-org/litestar/commit/6930a20ceb543912cd651b42deae5b9f3637a262 patch
- github.com product
- pypi.org product
- github.com vendor-advisory
- nvd.nist.gov vendor-advisory
- ENISA EUVD EUVD-2026-52437 third-party-advisory