Skip to main content
← All vulnerabilities
CVE-2026-25478GHSA-2P2X-HPG8-CQP2PYSEC-2026-2195

Litestar has a CORS origin allowlist bypass due to unescaped regex metacharacters in allowed origins

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: no
  • Technical impact: partial

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: no · 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