Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-25479: CWE-185: Incorrect Regular Expression in litestar-org litestar

0
Medium
VulnerabilityCVE-2026-25479cvecve-2026-25479cwe-185
Published: Mon Feb 09 2026 (02/09/2026, 18:48:19 UTC)
Source: CVE Database V5
Vendor/Project: litestar-org
Product: litestar

Description

CVE-2026-25479 is a medium-severity vulnerability in the litestar ASGI framework versions prior to 2. 20. 0. It arises from improper handling of allowlist host entries, where regex metacharacters are not escaped, allowing attackers to bypass intended hostname restrictions by supplying crafted host headers that match the regex but are not legitimate hosts. This can lead to partial confidentiality and integrity impacts without requiring authentication or user interaction. The vulnerability is fixed in litestar version 2. 20. 0. European organizations using vulnerable litestar versions in web applications may face risks of host header attacks, potentially enabling unauthorized access or manipulation of application behavior. Mitigation involves upgrading to version 2.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 02/17/2026, 09:43:43 UTC

Technical Analysis

CVE-2026-25479 is a vulnerability in the litestar ASGI framework, specifically in the middleware component responsible for enforcing allowed hosts via the 'allowed_hosts' configuration. Prior to version 2.20.0, the framework compiles allowlist entries into regular expressions without escaping regex metacharacters. This means that characters like '.' retain their special meaning, matching any character rather than the literal dot. An attacker can exploit this by supplying a Host header that matches the regex pattern but is not the intended hostname, effectively bypassing host-based access controls. This bypass can lead to scenarios such as web cache poisoning, host header injection, or unauthorized access to internal services if host validation is relied upon for security decisions. The vulnerability does not require authentication or user interaction and can be exploited remotely over the network. The CVSS 3.1 base score is 6.5, reflecting a medium severity with network attack vector, low attack complexity, no privileges required, and no user interaction. The flaw impacts confidentiality and integrity but does not affect availability. The issue is resolved in litestar 2.20.0 by properly escaping regex metacharacters in allowlist entries, ensuring literal hostname matching. No known exploits are currently reported in the wild, but the vulnerability poses a risk to applications relying on litestar for host validation.

Potential Impact

For European organizations, this vulnerability can undermine the security of web applications built on the litestar framework by allowing attackers to bypass host-based restrictions. This can lead to unauthorized access to application endpoints, potential leakage of sensitive information, or manipulation of application logic that depends on host validation. Industries with strict data protection requirements, such as finance, healthcare, and government, may face increased risk of confidentiality breaches. Additionally, attackers could exploit this flaw to perform web cache poisoning or redirect users to malicious sites, impacting user trust and compliance with regulations like GDPR. Since litestar is an ASGI framework often used in modern Python web applications, organizations using it in microservices or API gateways may see their internal network segmentation weakened. The medium severity indicates a moderate but non-trivial risk, especially if combined with other vulnerabilities or misconfigurations.

Mitigation Recommendations

The primary mitigation is to upgrade all litestar deployments to version 2.20.0 or later, where the vulnerability is fixed by escaping regex metacharacters in allowlist entries. Organizations should audit their current litestar versions and plan immediate upgrades. Additionally, review and sanitize all host allowlist configurations to ensure they do not contain unintended regex patterns or metacharacters. Implement strict input validation on Host headers at the application or web server level to reject suspicious or malformed hostnames. Employ web application firewalls (WAFs) with rules to detect and block anomalous Host header values. Conduct penetration testing focusing on host header injection and bypass scenarios to validate the effectiveness of mitigations. Finally, monitor logs for unusual host header patterns that could indicate exploitation attempts.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-02-02T16:31:35.821Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 698a36074b57a58fa16ab1da

Added to database: 2/9/2026, 7:31:19 PM

Last enriched: 2/17/2026, 9:43:43 AM

Last updated: 3/26/2026, 9:38:11 PM

Views: 95

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses