CVE-2026-48061: CWE-644: Improper Neutralization of HTTP Headers for Scripting Syntax in litestar-org litestar
Litestar versions prior to 2.22.0 contain a vulnerability in the AllowedHostsMiddleware where the X-Forwarded-Host header is trusted as a fallback when the Host header is missing. This allows an attacker to bypass allowed hosts validation by omitting the Host header and supplying a malicious X-Forwarded-Host header. The vulnerability enables host header injection attacks such as password reset poisoning, cache poisoning, and server-side request routing manipulation. The issue is fixed in version 2.22.0.
AI Analysis
Technical Summary
Litestar, an ASGI framework, versions before 2.22.0 have a vulnerability (CWE-644) where the AllowedHostsMiddleware improperly neutralizes HTTP headers for scripting syntax. Specifically, if the Host header is omitted, the middleware falls back to trusting the client-controllable X-Forwarded-Host header. This allows attackers to bypass allowed hosts validation by supplying a whitelisted domain in X-Forwarded-Host, enabling host header injection attacks including password reset poisoning, cache poisoning, and manipulation of server-side request routing. Applications using AllowedHostsConfig are affected if deployed without a reverse proxy that strips X-Forwarded-Host or when accepting HTTP/1.0 connections. The vulnerability is resolved in Litestar version 2.22.0.
Potential Impact
An attacker can bypass allowed hosts validation by manipulating the X-Forwarded-Host header when the Host header is missing. This can lead to host header injection attacks such as password reset poisoning, cache poisoning, and server-side request routing manipulation. These impacts affect the integrity of application behavior and security controls relying on host validation.
Mitigation Recommendations
This vulnerability is fixed in Litestar version 2.22.0. Users should upgrade to version 2.22.0 or later to remediate the issue. Additionally, deploying a reverse proxy that strips or validates the X-Forwarded-Host header can mitigate the risk. Applications accepting HTTP/1.0 connections should also consider restricting or validating such traffic. Patch status is not explicitly confirmed in the advisory, but the fix is stated to be in version 2.22.0.
CVE-2026-48061: CWE-644: Improper Neutralization of HTTP Headers for Scripting Syntax in litestar-org litestar
Description
Litestar versions prior to 2.22.0 contain a vulnerability in the AllowedHostsMiddleware where the X-Forwarded-Host header is trusted as a fallback when the Host header is missing. This allows an attacker to bypass allowed hosts validation by omitting the Host header and supplying a malicious X-Forwarded-Host header. The vulnerability enables host header injection attacks such as password reset poisoning, cache poisoning, and server-side request routing manipulation. The issue is fixed in version 2.22.0.
CVSS v3.1
Score 5.9medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Litestar, an ASGI framework, versions before 2.22.0 have a vulnerability (CWE-644) where the AllowedHostsMiddleware improperly neutralizes HTTP headers for scripting syntax. Specifically, if the Host header is omitted, the middleware falls back to trusting the client-controllable X-Forwarded-Host header. This allows attackers to bypass allowed hosts validation by supplying a whitelisted domain in X-Forwarded-Host, enabling host header injection attacks including password reset poisoning, cache poisoning, and manipulation of server-side request routing. Applications using AllowedHostsConfig are affected if deployed without a reverse proxy that strips X-Forwarded-Host or when accepting HTTP/1.0 connections. The vulnerability is resolved in Litestar version 2.22.0.
Potential Impact
An attacker can bypass allowed hosts validation by manipulating the X-Forwarded-Host header when the Host header is missing. This can lead to host header injection attacks such as password reset poisoning, cache poisoning, and server-side request routing manipulation. These impacts affect the integrity of application behavior and security controls relying on host validation.
Mitigation Recommendations
This vulnerability is fixed in Litestar version 2.22.0. Users should upgrade to version 2.22.0 or later to remediate the issue. Additionally, deploying a reverse proxy that strips or validates the X-Forwarded-Host header can mitigate the risk. Applications accepting HTTP/1.0 connections should also consider restricting or validating such traffic. Patch status is not explicitly confirmed in the advisory, but the fix is stated to be in version 2.22.0.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-05-20T18:25:25.707Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a7105c0bf32cb7a3436d791
Added to database: 08/03/2026, 21:18:56 UTC
Last enriched: 08/03/2026, 21:52:05 UTC
Last updated: 08/04/2026, 01:17:43 UTC
Views: 6
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.