Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. litestar
  4. ›
  5. CVE-2026-25478

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

February 9, 2026

CORS origin validation can be bypassed because the allowed-origins allowlist is compiled into a regex without escaping metacharacters (notably .). An allowed origin like https://good.example can match https://goodXexample, resulting in Access-Control-Allow-Origin being set for an untrusted origin

References

  • github.com/advisories/GHSA-2p2x-hpg8-cqp2
  • github.com/litestar-org/litestar
  • github.com/litestar-org/litestar/security/advisories/GHSA-2p2x-hpg8-cqp2
  • nvd.nist.gov/vuln/detail/CVE-2026-25478

Code Behaviors & Features

Detect and mitigate CVE-2026-25478 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 2.19.0 before 2.20.0, version 2.19.0

Fixed versions

  • 2.20.0

Solution

Upgrade to version 2.20.0 or above.

Impact 7.4 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-942: Permissive Cross-domain Policy with Untrusted Domains

Source file

pypi/litestar/CVE-2026-25478.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 25 Mar 2026 00:17:53 +0000.