Litestar: AllowedHostsMiddleware bypasses host validation via client-controlled X-Forwarded-Host header
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-48061
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 2 Nov 2026, 23:07 UTC · Revision 1
Source evidence
Litestar: AllowedHostsMiddleware bypasses host validation via client-controlled X-Forwarded-Host header
core-osv · Original sourcePublished 3 Aug 2026, 20:47 UTC
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.
osv:CVE-2026-48061
Complete source record
{
"id": "3962533436d44aab7c73e8d85431b727a624b1946b22677d92c88f620aa43713",
"url": "https://osv.dev/vulnerability/CVE-2026-48061",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Litestar: AllowedHostsMiddleware bypasses host validation via client-controlled X-Forwarded-Host header",
"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.",
"evidence": "osv:CVE-2026-48061",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2026-48061",
"aliases": [
"CVE-2026-48061",
"GHSA-3qmc-cj7q-62hv",
"PYSEC-2026-2603"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/litestar-org/litestar",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "2f80070e237bde0a5c8035efde1ffebb1b949271"
},
{
"fixed": "6930a20ceb543912cd651b42deae5b9f3637a262"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "2.22.0"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "6930a20ceb543912cd651b42deae5b9f3637a262"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"v2.21.1",
"v2.21.0",
"v2.20.0",
"v2.19.0",
"v2.18.0",
"v2.17.0",
"v2.16.0",
"v2.15.2",
"v2.15.1",
"v2.15.0",
"v2.14.0",
"v2.13.0",
"v2.12.1",
"v2.12.0",
"v2.11.0",
"v2.10.0",
"v2.9.0",
"v2.7.1",
"v2.6.3",
"v2.8.0",
"v2.7.0",
"v2.6.2",
"v2.6.1",
"v2.6.0",
"v2.5.5",
"v2.5.4",
"v2.5.3",
"v2.5.2",
"v2.5.1",
"v2.5.0",
"v2.4.5",
"v2.4.4",
"v2.4.3",
"v2.4.2",
"v2.4.1",
"v2.4.0",
"v2.3.2",
"v2.3.1",
"v2.3.0",
"v2.2.1",
"v2.2.0",
"v2.1.1",
"v2.1.0",
"v2.0.0",
"v2.0.0rc1",
"v2.0.0beta4",
"v2.0.0beta3",
"v2.0.0beta2",
"v2.0.0beta1",
"v2.0.0alpha7",
"v2.0.0alpha6",
"v2.0.0alpha5",
"v2.0.0alpha4",
"v2.0.0alpha3",
"v2.0.0alpha2",
"v2.0.0alpha1",
"v1.51.0",
"v1.50.2",
"v1.50.1",
"v1.50.0",
"v1.49.0",
"v1.48.1",
"v1.48.0",
"v1.47.0",
"v1.46.0",
"v1.45.1",
"v1.45.0",
"v1.44.0",
"v1.43.1",
"v1.43.0",
"v1.42.0",
"v1.41.0",
"v1.40.1",
"v1.40.0",
"v1.39.0",
"v1.38.0",
"v1.37.0",
"v1.36.0",
"v1.35.1",
"v1.35.0",
"v1.34.0",
"v1.33.0",
"v1.32.0",
"v1.31.0",
"v1.30.0",
"v1.29.0",
"v1.28.1",
"v1.28.0",
"v1.27.0",
"v1.26.1",
"v1.26.0",
"v1.25.0",
"v1.24.0",
"v1.23.1",
"v1.23.0",
"v1.22.0",
"v1.21.2",
"v1.21.1",
"v1.21.0",
"v1.20.0",
"v1.19.0",
"v1.18.1",
"v1.18.0",
"v1.17.2",
"v1.17.1",
"v1.17.0",
"v1.16.2",
"v1.16.1",
"v1.16.0",
"v1.15.0",
"v1.14.2",
"v1.14.1",
"v1.14.0",
"v1.13.1",
"v1.13.0",
"v1.12.0",
"v1.11.1",
"v1.11.0",
"v1.10.1",
"v1.10.0",
"v1.9.1",
"v1.9.0",
"v1.8.1",
"v1.8.0",
"v1.7.3",
"v1.7.1",
"v1.7.0",
"v1.6.3",
"v1.6.2",
"v1.6.1",
"v1.6.0",
"v1.5.4",
"v1.5.3",
"v1.5.2",
"v1.5.1",
"v1.5.0",
"v1.4.2",
"v1.4.1",
"v1.4.0",
"v1.3.9",
"v1.3.8",
"v1.3.7",
"v1.3.6",
"v1.3.5",
"v1.3.4",
"v1.3.3",
"v1.3.2",
"v1.3.1",
"v1.3.0",
"v1.2.5",
"v1.2.4",
"v1.2.3",
"v1.2.2",
"v1.2.1",
"v1.2.0",
"v1.1.1",
"v1.0.4",
"v1.1.0",
"v1.0.5",
"v1.0.3",
"v1.0.2",
"v1.0.1",
"v1.0.0",
"0.7.2",
"v0.7.1",
"v0.7.0",
"v0.6.0",
"v0.5.0",
"v0.4.3",
"v0.4.2",
"v0.4.1",
"v0.4.0",
"v0.3.0",
"v0.2.1",
"v0.2.0",
"v0.1.6",
"v0.1.5",
"v0.1.4",
"v0.1.3",
"v0.1.2",
"v0.1.1",
"v0.1.0",
"v0.1.0b1",
"v0.0.1a"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-48061.json"
}
}
],
"modified": "2026-10-28T02:30:24.186115599Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/48xxx/CVE-2026-48061.json",
"https://github.com/litestar-org/litestar/security/advisories/GHSA-3qmc-cj7q-62hv",
"https://nvd.nist.gov/vuln/detail/CVE-2026-48061",
"https://github.com/litestar-org/litestar/commit/6930a20ceb543912cd651b42deae5b9f3637a262"
],
"provider_metadata": {
"cwe_ids": [
"CWE-644"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/48xxx/CVE-2026-48061.json"
}
},
"related_cves": [
{
"value": "CVE-2026-48061",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 490749,
"published_at": "2026-08-03T20:47:34.673+00:00"
}