# CVE-2026-25479: Litestar has an AllowedHosts validation bypass due to unescaped regex metacharacters in configured host patterns

- Severity: Medium 6.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/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.35%, higher than 31% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-02-09T17:19:00.000Z
- Modified: 2026-07-13T07:26:17.638Z
- Also known as: GHSA-93ph-p7v4-hwh4, PYSEC-2026-2196
- Weaknesses: CWE-185
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: 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.

(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 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`
- GitHub: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`
- PyPA Advisory Database: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`

## References

- <https://github.com/litestar-org/litestar/security/advisories/GHSA-93ph-p7v4-hwh4> (exploit, evidence, vendor-advisory, web)
- <https://github.com/litestar-org/litestar/commit/06b36f481d1bfea6f19995cfb4f203aba45c4ace> (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-25479> (advisory)
- <https://github.com/litestar-org/litestar> (package)

## Sources

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

---

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