CVE-2021-21299 json
Multiple Transfer-Encoding headers misinterprets request payload
published 2021-02-05 5 y ago modified 2026-10-12 27 d ago also GHSA-6hfq-h8hq-87mf , RUSTSEC-2021-0020 , EUVD-2021-1600
- cvss
- 4.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 4.8%
- EPSS 4.8% chance of exploitation in 30 days, percentile 91%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- crates.io hyper 0.12.36, 0.13.10, 0.14.3
- hyper hyper 0.13.10, 0.14.3
- rust-hyper Debian 14, Debian 13, Debian 12 0.14.19-1
debian advisories DEBIAN-CVE-2021-21299
- tuigreet openSUSE Tumbleweed 0.7.1-6.1
- wayshot openSUSE Tumbleweed 1.1.9-1.1
- spotifyd openSUSE Tumbleweed 0.3.3-9.1
opensuse advisories openSUSE-SU-2024:12238-1openSUSE-SU-2024:12239-1openSUSE-SU-2024:12274-1
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-21299 updated cvss 8.1
rust-hyper: multiple Transfer-Encoding headers misinterprets request payload
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
4.79% chance of exploitation in the next 30 days, higher than 91% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 4.8 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N |
| NVD | 3.1 | 8.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 6.8 | AV:N/AC:M/Au:N/C:P/I:P/A:P |
| GitHub | 3.1 | 4.8 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N |
| OSV | 3.1 | 8.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | hyper | >=0.14.0, <0.14.3 >=0.13.0, <0.13.10 >=0.12.0, <0.12.36 >=0.13.0-0, <0.13.10 >=0.14.0-0, <0.14.3 |
0.14.3 0.13.10 0.12.36 |
Affected products
- hyperium hyper
Classification
- Weakness
-
- CWE-444 Inconsistent Interpretation of HTTP Requests
References
-
github.com
/hyperium/hyper/commit/8f93123efef5c1361086688fe4f34c83c89cec02
web, patch, third-party-advisory
-
portswigger.net
/research/http-desync-attacks-request-smuggling-reborn
web, third-party-advisory
-
rustsec.org
/advisories/RUSTSEC-2021-0020.html
web, third-party-advisory, advisory
-
github.com
/hyperium/hyper/security/advisories/GHSA-6hfq-h8hq-87mf
web, third-party-advisory
-
crates.io
/crates/hyper
product, third-party-advisory, package
-
nvd.nist.gov
/vuln/detail/CVE-2021-21299
advisory
-
github.com
/hyperium/hyper
package
Sources
- CVE List CVE-2021-21299
- GitHub Advisory GHSA-6hfq-h8hq-87mf
- NVD CVE-2021-21299
- OSV RUSTSEC-2021-0020
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.