CVE-2026-25478
MEDIUM 6.5CVSS 3.1Litestar's CORS origin allowlist has a bypass due to unescaped regex metacharacters in allowed origins
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.
- Published
- 9 Feb 2026
- Last modified
- 13 Jul 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-942
- Also known as
- GHSA-2p2x-hpg8-cqp2PYSEC-2026-2195
- Sources
- NVDJSONOSV GHSA-2p2x-hpg8-cqp2JSONOSV PYSEC-2026-2195JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
| OSV | PyPA | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | litestar | litestarcpe:2.3:a:litestar:litestar:*:*:*:*:*:*:*:* |
< 2.20.0 | 2.20.0 |
| OSV | PyPI | litestar | >= 2.19.0, < 2.20.0 | 2.20.0 |
| OSV | PyPI | litestar | < 2.20.0 | 2.20.0 |
References
- https://docs.litestar.dev/2/release-notes/changelog.html#2.20.0 · Release Notes, WEB, ADVISORY
- https://github.com/litestar-org/litestar/commit/eb87703b309efcc0d1b087dcb12784e76b003d5a · Patch, WEB, FIX
- https://github.com/litestar-org/litestar/releases/tag/v2.20.0 · Release Notes, WEB, ADVISORY
- https://github.com/litestar-org/litestar/security/advisories/GHSA-2p2x-hpg8-cqp2 · Exploit, Vendor Advisory, WEB, EVIDENCE
- https://nvd.nist.gov/vuln/detail/CVE-2026-25478 · ADVISORY
- https://github.com/litestar-org/litestar · PACKAGE
History
- 25 Nov 2026 21:01 UTC · NVD: first stored (published 9 Feb 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 9 Feb 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 9 Feb 2026)