CVE-2026-48061 Litestar: AllowedHostsMiddleware bypasses host validation via client-controlled X-Forwarded-Host header

Medium 5.9 Published Updated

Attackers can bypass host validation in Litestar by spoofing the X-Forwarded-Host header, enabling password reset poisoning and cache poisoning attacks.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-48061?

CVE-2026-48061 is a medium-severity vulnerability in litestar-org litestar, published on 3 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-644

Which versions are affected by CVE-2026-48061?

3 open source packages ship an affected version, including litestar.

PackageAffectedFixed in
litestar PyPIAll versions2.22.0
litestar PyPIAll versions2.22.0
litestar PyPIAll versions2.22.0

How do I fix CVE-2026-48061?

Upgrade litestar to 2.22.0 or later.

Is CVE-2026-48061 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-48061 exists.

Sources

Also known as GHSA-3qmc-cj7q-62hv, PYSEC-2026-2603.

Is CVE-2026-48061 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free