CVE-2026-25478CWE-942

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

High · published February 9, 2026

CVSS v3.1
7.4
EPSS
1%
Percentile
44.5
In the wild
Unconfirmed
What it is

⚡ A crafty regex oversight is at the heart of this CORS vulnerability! A misconfigured allowlist could let malicious origins access your server with ease! Think of it like a restaurant that has a list of acceptable guests but forgets to double-check their names at the door; anyone with a similar name could just waltz in without a reservation! This vulnerability could allow attackers to spoof trusted origins, giving them access to sensitive data or functionalities on your server. An unexpected origin slipping through the cracks could lead to data theft or manipulation — absolutely devastating to your application’s integrity!

Put simply

Think of it like a restaurant that has a list of acceptable guests but forgets to double-check their names at the door; anyone with a similar name could just waltz in without a reservation! Before version 2.20.0, Litestar’s CORS configuration allowed for regex-based checks on origins without properly escaping metacharacters. This flawed regex implementation enabled malicious origins to match unexpectedly, bypassing intended security measures.

What to do

This vulnerability could allow attackers to spoof trusted origins, giving them access to sensitive data or functionalities on your server. An unexpected origin slipping through the cracks could lead to data theft or manipulation — absolutely devastating to your application’s integrity! Upgrade Litestar to version 2.20.0 or later immediately to eliminate this vulnerability. Review your CORS configurations to ensure proper escaping of regex metacharacters and consider implementing additional security measures like strict allowlists. Stay vigilant! You’re on the right track! Fix this vulnerability and boost your security game! 🛡️

The record
Technical detail
CVSS v3.1
7.4 · HIGH
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N
CVSS v4.0
Not supplied
EPSS
0.00538 · 44.5th percentile
Weakness
CWE-942 · Permissive Cross-domain Security Policy with Untrusted Domains
Published
2026-02-09T18:46Z
EPSS history
Timeline
  • 09 FEB 18:46Z
    Litestar has a CORS origin allowlist bypass due to unescaped regex metacharacters in allowed origins
    cvelistv5