Regex Bypass Vulnerability in Litestar ASGI Framework by Litestar
CVE-2026-25479
6.5MEDIUM
What is CVE-2026-25479?
The Litestar ASGI framework contains a vulnerability in the litestar.middleware.allowed_hosts functionality. Prior to version 2.20.0, allowlist entries were incorrectly handled, allowing regex patterns to improperly match unintended hostnames. This flaw enables attackers to exploit regex metacharacters, making it possible for them to pose as legitimate sources by supplying hostnames that match the regex but do not correspond to the actual intended host. This vulnerability has been addressed in version 2.20.0.
Affected Version(s)
litestar < 2.20.0
