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

Read the record on cve.org

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

CVSSScoreVectorSource
3.16.5 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:NGitHub_M

Weaknesses

  • CWE-185 Incorrect Regular Expression

Affected Products

ProductVersions
litestarlitestar-org
  • < 2.20.0Affected

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.