CVE-2026-25479

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

Published Feb 9, 2026 CVSS 3.1 · 6.5 Medium EPSS < 1% KEV · Not listed
Description
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-93ph-p7v4-hwh4 Litestar's AllowedHosts has a validation bypass due to unescaped regex metacharacters in configured host patterns
History
Type Values Removed Values Added
First Time appeared Litestar
Litestar litestar
CPEs cpe:2.3:a:litestar:litestar:*:*:*:*:*:*:*:*
Vendors & Products Litestar
Litestar litestar
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Litestar-org
Litestar-org litestar
Vendors & Products Litestar-org
Litestar-org litestar
Type Values Removed Values Added
Description 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.
Title Litestar has an AllowedHosts validation bypass due to unescaped regex metacharacters in configured host patterns
Weaknesses CWE-185
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Feb 10, 2026, 4:01 PM
Reserved
Feb 2, 2026, 4:31 PM
Status
Analyzed
Published
Feb 9, 2026, 8:15 PM
Modified
Jun 17, 2026, 10:24 AM