CVE-2021-21299
Hyper HTTP Library Transfer Encoding Header Smuggling Vulnerability
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.
INFO
Published Date :
Feb. 11, 2021, 6:15 p.m.
Last Modified :
Feb. 19, 2021, 6:28 p.m.
Source :
[email protected]
Remotely Exploitable :
Yes !
Impact Score :
5.9
Exploitability Score :
2.2
Public PoC/Exploit Available at Github
CVE-2021-21299 has a 2 public PoC/Exploit
available at Github.
Go to the Public Exploits
tab to see the list.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2021-21299
.
URL | Resource |
---|---|
https://crates.io/crates/hyper | Product Third Party Advisory |
https://github.com/hyperium/hyper/commit/8f93123efef5c1361086688fe4f34c83c89cec02 | Patch 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 |
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
None
Python Shell Dockerfile HTML Go JavaScript Ruby PHP VCL ASP.NET
None
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2021-21299
vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2021-21299
vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Modified by [email protected]
May. 14, 2024
Action Type Old Value New Value -
Initial Analysis by [email protected]
Feb. 19, 2021
Action Type Old Value New Value Added CVSS V2 NIST (AV:N/AC:M/Au:N/C:P/I:P/A:P) Added CVSS V3.1 NIST AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H Changed Reference Type https://crates.io/crates/hyper No Types Assigned https://crates.io/crates/hyper Product, Third Party Advisory Changed Reference Type https://github.com/hyperium/hyper/commit/8f93123efef5c1361086688fe4f34c83c89cec02 No Types Assigned https://github.com/hyperium/hyper/commit/8f93123efef5c1361086688fe4f34c83c89cec02 Patch, Third Party Advisory Changed Reference Type https://github.com/hyperium/hyper/security/advisories/GHSA-6hfq-h8hq-87mf No Types Assigned https://github.com/hyperium/hyper/security/advisories/GHSA-6hfq-h8hq-87mf Third Party Advisory Changed Reference Type https://portswigger.net/research/http-desync-attacks-request-smuggling-reborn No Types Assigned https://portswigger.net/research/http-desync-attacks-request-smuggling-reborn Third Party Advisory Changed Reference Type https://rustsec.org/advisories/RUSTSEC-2021-0020.html No Types Assigned https://rustsec.org/advisories/RUSTSEC-2021-0020.html Third Party Advisory Added CPE Configuration OR *cpe:2.3:a:hyper:hyper:*:*:*:*:*:rust:*:* versions from (including) 0.12.0 up to (excluding) 0.13.10 *cpe:2.3:a:hyper:hyper:*:*:*:*:*:rust:*:* versions from (including) 0.14.0 up to (excluding) 0.14.3 -
CVE Modified by [email protected]
Feb. 12, 2021
Action Type Old Value New Value Added Reference https://rustsec.org/advisories/RUSTSEC-2021-0020.html [No Types Assigned] -
CVE Modified by [email protected]
Feb. 11, 2021
Action Type Old Value New Value Changed 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. 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.
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2021-21299
is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2021-21299
weaknesses.
Exploit Prediction
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.
0.29 }} 0.03%
score
0.65581
percentile