CVE-2026-25479
Litestar has an AllowedHosts validation bypass due to unescaped regex metacharacters in configured host patterns
- State
- Published
- Severity
- 6.5 Medium
- Published
- Feb 9, 2026
- Updated
- Feb 10, 2026
- Reserved
- Feb 2, 2026
Description
Litestar is an Asynchronous Server Gateway Interface (ASGI) framework. Prior to 2.20.0, in litestar.middleware.allowed_hosts, allowlist entries are compiled into regex patterns in a way that allows regex metacharacters to retain special meaning (e.g., . matches any character). This enables a bypass where an attacker supplies a host that matches the regex but is not the intended literal hostname. This vulnerability is fixed in 2.20.0.
Scores
| CVSS | Score | Vector | Source |
|---|---|---|---|
| 3.1 | 6.5 Medium | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N | GitHub_M |
Weaknesses
- CWE-185 Incorrect Regular Expression
Affected Products
| Product | Versions |
|---|---|
litestarlitestar-org |
|
References
Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.