gunicorn is vulnerable to HTTP Header Injection
54
Medium Risk
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.
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.
gunicorn is vulnerable to HTTP Header Injection in versions 25.0.0 - 26.1.0.
Upgrade the gunicorn library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.