{"id":"CVE-2026-48061","published":"2026-08-03T20:47:34Z","modified":"2026-08-04T15:05:11Z","title":"Litestar: AllowedHostsMiddleware bypasses host validation via client-controlled X-Forwarded-Host header","vendor":"litestar-org","product":"litestar","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.9,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00375,"percentile":0.23436,"provenance":"source"},"cwes":[{"id":"CWE-644","name":"Improper Neutralization of HTTP Headers for Scripting Syntax"}],"references":[{"url":"https://github.com/litestar-org/litestar/security/advisories/GHSA-3qmc-cj7q-62hv","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/litestar-org/litestar/commit/6930a20ceb543912cd651b42deae5b9f3637a262","tags":["x_refsource_MISC"]}],"priority":{"score":8.8,"factors":[{"name":"EPSS percentile","points":4.69},{"name":"CVSS severity","points":4.13}]},"vendorSlug":"litestar-org","affectedVersions":[{"vendor":"litestar-org","product":"litestar","versions":["< 2.22.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-08-04T13:33:39.144833Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"litestar","vulnerableRanges":["<2.22.0"],"patched":["2.22.0"],"from":["GHSA-3qmc-cj7q-62hv","PYSEC-2026-2603"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-52437","exploited":false,"provenance":"source"}}