CVE-2026-25479
MEDIUM 6.5CVSS 3.1Litestar's AllowedHosts has a validation bypass due to unescaped regex metacharacters in configured host patterns
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.
- Published
- 9 Feb 2026
- Last modified
- 13 Jul 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-185
- Also known as
- GHSA-93ph-p7v4-hwh4PYSEC-2026-2196
- Sources
- NVDJSONOSV GHSA-93ph-p7v4-hwh4JSONOSV PYSEC-2026-2196JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
| OSV | PyPA | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | litestar | litestarcpe:2.3:a:litestar:litestar:*:*:*:*:*:*:*:* |
< 2.20.0 | 2.20.0 |
| OSV | PyPI | litestar | >= 2.19.0, < 2.20.0 | 2.20.0 |
| OSV | PyPI | litestar | < 2.20.0 | 2.20.0 |
References
- https://docs.litestar.dev/2/release-notes/changelog.html#2.20.0 · Release Notes, WEB, ADVISORY
- https://github.com/litestar-org/litestar/commit/06b36f481d1bfea6f19995cfb4f203aba45c4ace · Patch, WEB, FIX
- https://github.com/litestar-org/litestar/releases/tag/v2.20.0 · Release Notes, WEB, ADVISORY
- https://github.com/litestar-org/litestar/security/advisories/GHSA-93ph-p7v4-hwh4 · Exploit, Vendor Advisory, WEB, EVIDENCE
- https://nvd.nist.gov/vuln/detail/CVE-2026-25479 · ADVISORY
- https://github.com/litestar-org/litestar · PACKAGE
History
- 25 Nov 2026 21:01 UTC · NVD: first stored (published 9 Feb 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 9 Feb 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 9 Feb 2026)