# CVE-2026-48061: Litestar AllowedHostsMiddleware host validation bypass

Source: https://junglewise.ai/threats/cve-2026-48061-litestar-allowedhostsmiddleware-host-validation-bypass  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-03. Updated: 2026-06-10  
License: CC BY 4.0 with a link back

CVE-2026-48061 · Severity: medium · CVSS 5.9 · Published 2026-08-03

Litestar is a Python web framework used for building APIs and applications. A security flaw in its host validation middleware allows attackers to bypass domain restrictions by using a specific web header. This could allow an attacker to trick the system into sending password reset links to a malicious site or corrupting the application's cache, potentially leading to account takeovers or service disruptions.

Technologies: [litestar (PyPI)](https://junglewise.ai/threats/technologies/litestar). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-48061 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-48061 being exploited in the wild.

**How severe is CVE-2026-48061?** Medium severity, with a CVSS score of 5.9, published 3 August 2026.

**Which products and versions are affected?** litestar (PyPI) < 2.22.0, ECOSYSTEM:introduced=0,fixed=2.22.0.

**Is there a fix for CVE-2026-48061?** Yes. litestar (PyPI): upgrade to 2.22.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-48061 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-48061?** Check whether you run litestar (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- litestar (PyPI): upgrade to 2.22.0 or later

  ```sh
  pip install "litestar>=2.22.0"
  ```


## Technical details

The AllowedHostsMiddleware in Litestar incorrectly trusts the client-controlled X-Forwarded-Host header as a fallback when the standard Host header is missing. An attacker can exploit this by sending a request without a Host header and setting X-Forwarded-Host to a whitelisted domain, bypassing the regex-based host validation. This vulnerability is particularly effective in environments without a reverse proxy that strips untrusted forwarding headers. Successful exploitation enables host header injection attacks, including password reset poisoning, cache poisoning, and routing manipulation. The issue is fixed in version 2.22.0.

## Affected products

- litestar-org litestar < 2.22.0

## Identifiers

- CVE-2026-48061
- GHSA-3qmc-cj7q-62hv
- PYSEC-2026-2603

## Timeline

- 2026-05-20: disclosed: Vulnerability reported to maintainers
- 2026-06-10: advisory: GitHub Advisory published
- 2026-06-10: patched: Fix released in version 2.22.0

## References

- [https://api.github.com/users/gik2927](https://api.github.com/users/gik2927)
- [https://github.com/gik2927](https://github.com/gik2927)
- [https://api.github.com/users/gik2927/gists%7B/gist_id%7D](https://api.github.com/users/gik2927/gists%7B/gist_id%7D)
- [https://api.github.com/users/gik2927/repos](https://api.github.com/users/gik2927/repos)
- [https://avatars.githubusercontent.com/u/59925086?v=4](https://avatars.githubusercontent.com/u/59925086?v=4)
- [https://api.github.com/users/gik2927/events%7B/privacy%7D](https://api.github.com/users/gik2927/events%7B/privacy%7D)

## Related threats

- [Litestar XSS via CSRF token injection in templates](https://junglewise.ai/threats/cve-2026-48060-litestar-xss-via-csrf-token-injection-in-templates)
- [PYSEC-2026-2605 - Litestar and Starlite vulnerable to Path Traversal](https://junglewise.ai/threats/cve-2024-32982-litestar-and-starlite-vulnerable-to-path-traversal)
- [PYSEC-2026-1553 - Litestar X-Forwarded-For Header Spoofing Vulnerability Enables Rate Limit Evasion](https://junglewise.ai/threats/cve-2025-59152-litestar-x-forwarded-for-header-spoofing-vulnerability-enables)
- [PYSEC-2026-1944 - Litestar allows unbounded resource consumption (DoS vulnerability)](https://junglewise.ai/threats/cve-2024-52581-litestar-allows-unbounded-resource-consumption-dos-vulnerability)
- [Litestar's FileStore key canonicalization collisions allow response cache mixup/poisoning (ASCII ord + Unicode NFKD)](https://junglewise.ai/threats/cve-2026-25480-litestar-s-filestore-key-canonicalization-collisions-allow)
