Advisory

PYSEC-2026-2196

Also known as: CVE-2026-25479, GHSA-93ph-p7v4-hwh4

Summary

The record has no summary.

Details

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.

Severity

Medium Basis: CVSS v3 score 6.5, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Dates

Published
2026-02-09 20:15 UTC
Modified
2026-07-13 07:15 UTC

Affected packages and fixes

litestar

PyPI · All systems

Affected

  • introduced 0, fixed 2.20.0 (ecosystem)

Fixed versions

2.20.0

Fix

  • Fixed version 2.20.0
    pip install --upgrade litestar==2.20.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences