CVE-2026-25479
published medium CVSS 3.1 · 6.5Litestar has an AllowedHosts validation bypass due to unescaped regex metacharacters in configured host patterns
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| litestar-org | — | litestar< 2.20.0 | Affected | Not stated | GitHub_M |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 6.5 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| litestar-org | litestar | < 2.20.0 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-185 CWE-185: Incorrect Regular Expression
References
4Provider assertions
2GitHub_M · cna
Litestar has an AllowedHosts validation bypass due to unescaped regex metacharacters in configured host patterns
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 48d5ded04fc850b59a5d299cd2d45bdc5e2e1da4008765830d8c1b4cc33e361d
- Ingested
- 23 Sep 2026, 09:06:52 UTC
- Source record
- Official CVE record