Skip to main content
← All vulnerabilities
CVE-2026-25479GHSA-93PH-P7V4-HWH4PYSEC-2026-2196

Litestar has an AllowedHosts validation bypass due to unescaped regex metacharacters in configured host patterns

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 2.20.0
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: yes
  • Technical impact: partial

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: yes · Technical impact: partial

  3. Record last updated

Affected versions

  • litestar-org litestar

    fixed in 2.20.0

  • litestarPyPI

    From 2.19.0 · fixed in 2.20.0

  • litestarPyPI

    fixed in 2.20.0

References 4

GitHub · litestar-org/litestar

docs.litestar.dev