# CVE-2026-25478: Litestar has a CORS origin allowlist bypass due to unescaped regex metacharacters in allowed origins

- Severity: High 7.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.44%, higher than 39% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-02-09T17:18:52.000Z
- Modified: 2026-07-13T07:26:21.863Z
- Also known as: GHSA-2p2x-hpg8-cqp2, PYSEC-2026-2195
- Weaknesses: CWE-942
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- litestar-org litestar: < 2.20.0
- litestar (PyPI): from 2.19.0 before 2.20.0; before 2.20.0
- litestar litestar: before 2.20.0

## Every score

- GitHub_M: CVSS:3.1 7.4 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N`
- GitHub: CVSS:3.1 7.4 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`
- PyPA Advisory Database: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`

## References

- <https://github.com/litestar-org/litestar/security/advisories/GHSA-2p2x-hpg8-cqp2> (exploit, evidence, vendor-advisory, web)
- <https://github.com/litestar-org/litestar/commit/eb87703b309efcc0d1b087dcb12784e76b003d5a> (fix, patch, web)
- <https://docs.litestar.dev/2/release-notes/changelog.html#2.20.0> (advisory, release-notes, web)
- <https://github.com/litestar-org/litestar/releases/tag/v2.20.0> (advisory, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-25478> (advisory)
- <https://github.com/litestar-org/litestar> (package)

## Sources

- CVE List: [CVE-2026-25478](https://www.cve.org/CVERecord?id=CVE-2026-25478), CVE Terms of Use, modified 2026-02-10
- GitHub Advisory Database: [GHSA-2p2x-hpg8-cqp2](https://github.com/advisories/GHSA-2p2x-hpg8-cqp2), CC-BY-4.0, modified 2026-07-13
- NVD: [CVE-2026-25478](https://nvd.nist.gov/vuln/detail/CVE-2026-25478), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-2195](https://osv.dev/vulnerability/PYSEC-2026-2195), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-25478 · Whole record: https://cve.day/CVE-2026-25478.json · Rebuilt by cve.day 2026-11-25T22:59:13.665Z
