Litestar has an AllowedHosts validation bypass due to unescaped regex metacharacters in configured host patterns
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| litestar-org | litestar | before 2.20.0 | 2.20.0 | Patch available | CNA |
| — | litestar (PyPI) | 2.19.0 to before 2.20.0 | 2.20.0 | Patch available | GHSA-93ph-p7v4-hwh4 |
- litestar Vendorlitestar-org Affected before 2.20.0 Fixed in 2.20.0 Patch available CNA
- litestar (PyPI) Vendor— Affected 2.19.0 to before 2.20.0 Fixed in 2.20.0 Patch available GHSA-93ph-p7v4-hwh4
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:litestar:litestar:*:*:*:*:*:*:*:* | before 2.20.0 | Vulnerable | litestar-org |
- cpe:2.3:a:litestar:litestar:*:*:*:*:*:*:*:* Versions before 2.20.0 Vulnerable ·litestar-org
Remediation
- Fix · CNA litestar (litestar-org) Fixed in 2.20.0
- Fix · GHSA-93ph-p7v4-hwh4 litestar (PyPI) Fixed in 2.20.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-25479
- 2026-10-03 Alias added: GHSA-93ph-p7v4-hwh4
References
More litestar-org Litestar vulnerabilities
- TI-2024-35241 Litestar allows unbounded resource consumption (DoS vulnerability) CVSS 4.0HIGH 8.2
- TI-2026-20591 FileStore key canonicalization collisions allow response cache mixup/poisoning (ASCII ord + Unicode NFKD) CVSS 3.1MEDIUM 6.5
- TI-2026-20589 Litestar has a CORS origin allowlist bypass due to unescaped regex metacharacters in allowed origins CVSS 3.1HIGH 7.4
Sources
- CVE-2026-25479 · CVE Program
- CVE-2026-25479 · NVD
- FIRST EPSS
- GHSA-93ph-p7v4-hwh4 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences