CVE-2021-21299: hyper - HTTP Request Smuggling
- Cve: CVE-2021-21299
- Name: hyper - HTTP Request Smuggling
- Description: hyper is an open-source HTTP library for Rust (crates.io). In hyper from version 0.12.0 and before versions 0.13.10 and 0.14.3 there is a vulnerability that can enable a request smuggling attack. The HTTP server code had 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: 1) Using hyper as an HTTP server (the client is not affected), 2) Using HTTP/1.1 (HTTP/2 does not use transfer-encoding), 3) 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. This is fixed in versions 0.14.3 and 0.13.10. As a workaround one can take the following options: 1) Reject requests that contain a `transfer-encoding` header, 2) Ensure any upstream proxy handles `transfer-encoding` correctly.
- Impact: Attackers can perform request smuggling or desync attacks, potentially leading to request hijacking, cache poisoning, or other malicious activities.
- Remediation: Upgrade to hyper version 0.13.10 or 0.14.3, or implement request validation to reject requests with multiple transfer-encoding headers.
- Vulnerability type: http_request_smuggling
- Requirement type: none
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 8.1
- Cvss vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- Epss score: 0.04789
- Epss percentile: 0.92067
- Assignee: [email protected]
- Published at: 2021-02-11T18:15:16Z
- Age in days: 2112
- Modified at: 2026-06-17T03:35:14Z
- Patch available: yes
- References total: 5
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2021-21299
- Nvd status: modified
- Checked, none or zero: vulnerability impact, known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-444 | Inconsistent Interpretation of HTTP Requests |
References
Same in every row:
- Source: nvd
| Url | Tags |
|---|---|
| https://github.com/hyperium/hyper/commit/8f93123efef5c1361086688fe4f34c83c89cec02 | Patch, Third Party Advisory |
| https://crates.io/crates/hyper | Product, Third Party Advisory |
| https://github.com/hyperium/hyper/security/advisories/GHSA-6hfq-h8hq-87mf | Third Party Advisory |
| https://portswigger.net/research/http-desync-attacks-request-smuggling-reborn | Third Party Advisory |
| https://rustsec.org/advisories/RUSTSEC-2021-0020.html | Third Party Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| hyper:hyper | >= 0.14.0, < 0.14.3; >= 0.12.0, < 0.13.10 | no | nvd | /v1/products/hyper/hyper |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| hyperium/hyper | commit, fix, package, security_advisory | yes | /v1/repositories/hyperium/hyper |
Index
- Repositories: 12
- Packages: 1
- Checked, none or zero: repositories high signal
Exploitation
- Remote: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts