{"id":"CVE-2021-21299","published":"2021-02-11T18:00:18Z","modified":"2024-08-03T18:09:15Z","title":"Multiple Transfer-Encoding headers misinterprets request payload","vendor":"hyperium","product":"hyper","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.8,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.04789,"percentile":0.92142,"provenance":"source"},"cwes":[{"id":"CWE-444","name":"Inconsistent Interpretation of HTTP Requests"}],"references":[{"url":"https://portswigger.net/research/http-desync-attacks-request-smuggling-reborn","tags":["x_refsource_MISC"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0020.html","tags":["x_refsource_MISC"]},{"url":"https://github.com/hyperium/hyper/security/advisories/GHSA-6hfq-h8hq-87mf","tags":["x_refsource_CONFIRM"]},{"url":"https://crates.io/crates/hyper","tags":["x_refsource_MISC"]},{"url":"https://github.com/hyperium/hyper/commit/8f93123efef5c1361086688fe4f34c83c89cec02","tags":["x_refsource_MISC"]}],"priority":{"score":21.8,"factors":[{"name":"EPSS percentile","points":18.43},{"name":"CVSS severity","points":3.36}]},"vendorSlug":"hyperium","affectedVersions":[{"vendor":"hyperium","product":"hyper","versions":["< 0.13.10",">= 0.14.0, < 0.14.3"]}],"affected":[{"ecosystem":"crates.io","package":"hyper","vulnerableRanges":[">=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"],"patched":["0.14.3","0.13.10","0.12.36"],"from":["GHSA-6hfq-h8hq-87mf","RUSTSEC-2021-0020"],"provenance":"source"}],"summary":{"text":"The flaw is in the HTTP/1.1 server code of hyper, an open-source Rust HTTP library, where requests carrying multiple Transfer-Encoding headers are wrongly treated as having a chunked payload instead of being rejected as illegal. An attacker positioned behind a vulnerable upstream HTTP proxy, where the proxy and hyper disagree on where a request body ends, can smuggle or desynchronise requests, and exploitation requires hyper to be running as an HTTP server (not as a client) on HTTP/1.1, with no authentication or user interaction needed.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:11:14Z"},"euvd":{"id":"EUVD-2021-1600","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-hyperium-hyper-cve-2021-21299","children":[{"from":"CVE-2021-21299","to":"CVE-2021-32715","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/proto/h1/role.rs"],"commits":["https://github.com/hyperium/hyper/commit/8f93123efef5c1361086688fe4f34c83c89cec02","https://github.com/hyperium/hyper/commit/1fb719e0b61a4f3d911562a436a2ff05fd7cb759"],"basis":"shared function","functions":["Http1Transaction"]},{"kind":"similar","provenance":"machine","score":0.51,"basis":"same product + CWE + description similarity"}]}],"packageHistory":[{"cve":"CVE-2016-10932","published":"2019-08-26","fixed":"0.9.4","kev":false},{"cve":"CVE-2017-18587","published":"2019-08-26","fixed":"0.10.2","kev":false},{"cve":"CVE-2020-35863","published":"2020-12-31","fixed":"0.12.34","kev":false,"link":{"from":"CVE-2020-35863","to":"CVE-2021-21299","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"crates.io:hyper","fromFixed":"0.12.34","toFixed":"0.12.36","daysApart":42}]}},{"cve":"CVE-2021-21299","published":"2021-02-11","fixed":"0.14.3","kev":false},{"cve":"CVE-2021-32714","published":"2021-07-07","fixed":"0.14.10","kev":false},{"cve":"CVE-2021-32715","published":"2021-07-07","fixed":"0.14.10","kev":false}],"package":"crates.io:hyper"}}