CVE-2026-145494: Hypercorn through 0.18.0 WSGI Header Spoofing via Underscore Header Names
Hypercorn through 0.18.0 contains a header spoofing vulnerability in the WSGI wrapper buildenviron that allows remote attackers to spoof trusted headers by conflating underscores and hyphens in environ keys. Attackers can send headers such as xremoteuser through reverse proxies that only strip hyphenated forms, causing applications to read attacker values as trusted headers to spoof authenticated users.
Affected Software
Event History
Frequently Asked Questions
Which deployments are realistically exposed?
WSGI applications served by Hypercorn through 0.18.0 are exposed when they rely on reverse proxies to remove or control trusted request headers. The issue is particularly relevant when an application treats headers such as a remote-user header as authentication or identity input.
What does an attacker need to exploit this issue?
An attacker needs network access to send a crafted HTTP request; no credentials or user interaction are required. Exploitation depends on a reverse proxy stripping the hyphenated form of a trusted header while allowing an underscore-based form, such as x_remote_user.
How can I determine whether my deployment is affected?
Check whether Hypercorn is at version 0.18.0 or earlier and whether it serves a WSGI application. Then review proxy header-filtering rules and application authentication logic for headers that are trusted after proxy handling, and test whether underscore variants can reach the application as the corresponding WSGI environ key.