CVE-2026-25478
Undergoing Analysis Undergoing Analysis - In Progress
Regex Injection in Litestar CORSConfig Allows Origin Spoofing

Publication date: 2026-02-09

Last updated on: 2026-02-17

Assigner: GitHub, Inc.

Description
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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-02-09
Last Modified
2026-02-17
Generated
2026-05-07
AI Q&A
2026-02-09
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
litestar litestar to 2.20.0 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-942 The product uses a web-client protection mechanism such as a Content Security Policy (CSP) or cross-domain policy file, but the policy includes untrusted domains with which the web client is allowed to communicate.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability exists in the Litestar ASGI framework versions prior to 2.20.0. It involves the CORSConfig.allowed_origins_regex, which is a regular expression constructed from configured allowlist values to validate origins. Because metacharacters in the allowlist values are not escaped, a malicious origin can unexpectedly match the regex validation. This means that the check using allowed_origins_regex.fullmatch(origin) can be bypassed by crafted origins.


How can this vulnerability impact me? :

The vulnerability can allow a malicious origin to bypass the intended CORS origin validation. This could lead to unauthorized cross-origin requests being accepted by the server, potentially exposing sensitive data or functionality to untrusted origins.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

I don't know


How can this vulnerability be detected on my network or system? Can you suggest some commands?

I don't know


What immediate steps should I take to mitigate this vulnerability?

To mitigate this vulnerability, upgrade Litestar to version 2.20.0 or later, where the issue with allowed_origins_regex is fixed by properly escaping metacharacters in the regex used for origin validation.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart