Intel

AIKIDO-2026-625366

gunicorn is vulnerable to HTTP Header Injection

HTTP Header Injection Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published 2 days ago

54

Medium Risk

This Affects:

PYTHONgunicorn
25.0.0 - 26.1.0
Fixed in 26.2.0
Are you affected? Scan for Free

TL;DR

gunicorn's HTTP/2 request handling builds the WSGI environ directly from the HTTP/2 stream and skips the header-validation policy that the HTTP/1 path enforces. Untrusted clients can inject forged and underscore-prefixed HTTP_* environ entries, set SCRIPT_NAME, submit duplicate Host or Content-Type headers and control characters, and choose wsgi.url_scheme through the :scheme pseudo-header. The forwarded_allow_ips trust gate is also bypassed, so forwarding headers from untrusted peers are honored as if they came from a trusted proxy. The fix moves the shared header policy onto a mixin used by both request classes and derives the scheme from the transport unless the peer is trusted.

Who does this affect?

You are affected if you run a version in the vulnerable range and serve traffic over gunicorn's opt-in HTTP/2 support so that untrusted or externally reachable clients can open HTTP/2 requests. Deployments that only serve HTTP/1 or never enable HTTP/2 are not exposed by this code path.

Background info

gunicorn is vulnerable to HTTP Header Injection in versions 25.0.0 - 26.1.0.

How to fix this

Upgrade the gunicorn library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform