Hyper · Hyper · CVE-2021-21299
Name of the Vulnerable Software and Affected Versions:
hyper versions 0.12.0 through 0.13.9
hyper versions 0.14.0 through 0.14.2
Description:
The HTTP server code in hyper has a flaw that incorrectly understands some requests with multiple transfer-encoding headers to have a chunked payload, when it should have been rejected as illegal. This combined with an upstream HTTP proxy that understands the request payload boundary differently can result in "request smuggling" or "desync attacks". To determine if vulnerable, all these things must be true: using hyper as an HTTP server, using HTTP/1.1, and using a vulnerable HTTP proxy upstream to hyper. If an upstream proxy correctly rejects the illegal transfer-encoding headers, the desync attack cannot succeed. If there is no proxy upstream of hyper, hyper cannot start the desync attack, as the client will repair the headers before forwarding.
Recommendations:
For hyper versions 0.12.0 through 0.13.9, update to version 0.13.10 or later.
For hyper versions 0.14.0 through 0.14.2, update to version 0.14.3 or later.
As a temporary workaround, consider rejecting requests that contain a `transfer-encoding` header.
Alternatively, ensure any upstream proxy handles `transfer-encoding` correctly.