Litestar has a CORS origin allowlist bypass due to unescaped regex metacharacters in allowed origins
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · None · 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, CORSConfig.allowed_origins_regex is constructed using a regex built from configured allowlist values and used with fullmatch() for validation. Because metacharacters are not escaped, a malicious origin can match unexpectedly. The check relies on allowed_origins_regex.fullmatch(origin). This vulnerability is fixed in 2.20.0.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- 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-2p2x-hpg8-cqp2 |
- 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-2p2x-hpg8-cqp2
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-2p2x-hpg8-cqp2 litestar (PyPI) Fixed in 2.20.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-25478
- 2026-10-03 Alias added: GHSA-2p2x-hpg8-cqp2
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-20590 Litestar has an AllowedHosts validation bypass due to unescaped regex metacharacters in configured host patterns CVSS 3.1MEDIUM 6.5
Sources
- CVE-2026-25478 · CVE Program
- CVE-2026-25478 · NVD
- FIRST EPSS
- GHSA-2p2x-hpg8-cqp2 · 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