CVE-2021-32715
Lenient Parsing of Content-Length Header When Prefixed with Plus Sign
hyper is an HTTP library for rust. hyper's HTTP/1 server code had a flaw that incorrectly parses and accepts requests with a Content-Length header with a prefixed plus sign, when it should have been rejected as illegal. This combined with an upstream HTTP proxy that doesn't parse such Content-Length headers, but forwards them, can result in "request smuggling" or "desync attacks". The flaw exists in all prior versions of hyper prior to 0.14.10, if built with rustc v1.5.0 or newer. The vulnerability is patched in hyper version 0.14.10. Two workarounds exist: One may reject requests manually that contain a plus sign prefix in the Content-Length header or ensure any upstream proxy handles Content-Length headers with a plus sign prefix.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- Low
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
3.1
Lenient Parsing of Content-Length Header When Prefixed with Plus Sign
hyper is an HTTP library for rust. hyper's HTTP/1 server code had a flaw that incorrectly parses and accepts requests with a Content-Length header with a prefixed plus sign, when it should have been rejected as illegal. This combined with an upstream HTTP proxy that doesn't parse such Content-Length headers, but forwards them, can result in "request smuggling" or "desync attacks". The flaw exists in all prior versions of hyper prior to 0.14.10, if built with rustc v1.5.0 or newer. The vulnerability is patched in hyper version 0.14.10. Two workarounds exist: One may reject requests manually that contain a plus sign prefix in the Content-Length header or ensure any upstream proxy handles Content-Length headers with a plus sign prefix.
- Record
CVE-2021-32715- CVSS 3.1
- 3.1 Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N - Weakness
- CWE-444
- Updated
- 2026-11-02
EUVDEUVD-2021-1461
3.1
hyper is an HTTP library for rust. hyper's HTTP/1 server code had a flaw that incorrectly parses and accepts requests with a Content-Length header with a prefixed plus sign, when it should have been rejected as illegal. This combined with an upstream HTTP proxy that doesn't parse such Content-Length headers, but forwards them, can result in "request smuggling" or "desync attacks". The flaw exists in all prior versions of hyper prior to 0.14.10, if built with rustc v1.5.0 or newer. The vulnerability is patched in hyper version 0.14.10. Two workarounds exist: One may reject requests manually that contain a plus sign prefix in the Content-Length header or ensure any upstream proxy handles Content-Length headers with a plus sign prefix.
- Record
EUVD-2021-1461- CVSS 3.1
- 3.1 Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-f3pg-qwvg-p99c
3.1
Lenient Parsing of Content-Length Header When Prefixed with Plus Sign
Summary
hyper's HTTP/1 server code had a flaw that incorrectly parses and accepts requests with a Content-Length header with a prefixed plus sign, when it should have been rejected as illegal. This combined with an upstream HTTP proxy that doesn't parse such Content-Length headers, but forwards them, can result in "request smuggling" or "desync attacks".
Vulnerability
The flaw exists in all prior versions of hyper, if built with rustc v1.5.0 or newer.
Example:
GET / HTTP/1.1
Host: example.com
Content-Length: +3
abc
This request gets accepted and hyper reads the body as abc. The request should be rejected, according to RFC 7230, since the ABNF for Content-Length only allows for DIGITs. This is due to using the FromStr implementation for u64 in the standard library. By differing from the spec, it is possible to send requests like these to endpoints that have different HTTP implementations, with different interpretations of the payload semantics, and cause "desync attacks".
In this particular case, an upstream proxy would need to error when parsing the Content-Length, but not reject the request (swallowing its own error), and forwarding the request as-is with the Content-Length still included. Then the upstream proxy and hyper would disagree on the length of the request body. The combination of these factors would be extremely rare.
Read more about desync attacks: https://portswigger.net/research/http-desync-attacks-request-smuggling-reborn
Impact
To determine if vulnerable, all these things must be true:
- Using hyper as an HTTP server. While the lenient decoder also exists in the client, a vulnerability does not exist around responses.
- Using HTTP/1. The HTTP/2 code uses a stricter parser.
- Using a vulnerable HTTP proxy upstream to hyper. If an upstream proxy correctly rejects the illegal
Content-Lengthheader, OR can parse the length with the plus sign, the desync attack cannot succeed.
Patches
We have released the following patch versions:
- v0.14.10 (to be released when this advisor is published)
Workarounds
Besides upgrading hyper, you can take the following options:
- Reject requests manually that contain a plus sign prefix in the
Content-Lengthheader. - Ensure any upstream proxy handles
Content-Lengthheaders with a plus sign prefix.
Credits
This issue was initially reported by Mattias Grenfeldt and Asta Olofsson.
- Record
GHSA-f3pg-qwvg-p99c- CVSS 3.1
- 3.1 Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N - Weakness
- CWE-444
- Updated
- 2026-11-02
NVD
3.1
hyper is an HTTP library for rust. hyper's HTTP/1 server code had a flaw that incorrectly parses and accepts requests with a Content-Length header with a prefixed plus sign, when it should have been rejected as illegal. This combined with an upstream HTTP proxy that doesn't parse such Content-Length headers, but forwards them, can result in "request smuggling" or "desync attacks". The flaw exists in all prior versions of hyper prior to 0.14.10, if built with rustc v1.5.0 or newer. The vulnerability is patched in hyper version 0.14.10. Two workarounds exist: One may reject requests manually that contain a plus sign prefix in the Content-Length header or ensure any upstream proxy handles Content-Length headers with a plus sign prefix.
- Record
CVE-2021-32715- CVSS 3.1
- 3.1 Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N - CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N - CVSS 2.0
- 4.3 Medium
AV:N/AC:M/Au:N/C:N/I:P/A:N - Weakness
- CWE-444
- Updated
- 2026-11-02
OSV
5.3
hyper is an HTTP library for rust. hyper's HTTP/1 server code had a flaw that incorrectly parses and accepts requests with a Content-Length header with a prefixed plus sign, when it should have been rejected as illegal. This combined with an upstream HTTP proxy that doesn't parse such Content-Length headers, but forwards them, can result in "request smuggling" or "desync attacks". The flaw exists in all prior versions of hyper prior to 0.14.10, if built with rustc v1.5.0 or newer. The vulnerability is patched in hyper version 0.14.10. Two workarounds exist: One may reject requests manually that contain a plus sign prefix in the Content-Length header or ensure any upstream proxy handles Content-Length headers with a plus sign prefix.
- Record
CVE-2021-32715- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N - Updated
- 2026-11-02
OSVDEBIAN-CVE-2021-32715
5.3
hyper is an HTTP library for rust. hyper's HTTP/1 server code had a flaw that incorrectly parses and accepts requests with a Content-Length header with a prefixed plus sign, when it should have been rejected as illegal. This combined with an upstream HTTP proxy that doesn't parse such Content-Length headers, but forwards them, can result in "request smuggling" or "desync attacks". The flaw exists in all prior versions of hyper prior to 0.14.10, if built with rustc v1.5.0 or newer. The vulnerability is patched in hyper version 0.14.10. Two workarounds exist: One may reject requests manually that contain a plus sign prefix in the Content-Length header or ensure any upstream proxy handles Content-Length headers with a plus sign prefix.
- Record
DEBIAN-CVE-2021-32715- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N - Updated
- 2026-11-02
Show 4 moreShow less
OSVGHSA-f3pg-qwvg-p99c
3.1
Lenient Parsing of Content-Length Header When Prefixed with Plus Sign
Summary
hyper's HTTP/1 server code had a flaw that incorrectly parses and accepts requests with a Content-Length header with a prefixed plus sign, when it should have been rejected as illegal. This combined with an upstream HTTP proxy that doesn't parse such Content-Length headers, but forwards them, can result in "request smuggling" or "desync attacks".
Vulnerability
The flaw exists in all prior versions of hyper, if built with rustc v1.5.0 or newer.
Example:
GET / HTTP/1.1
Host: example.com
Content-Length: +3
abc
This request gets accepted and hyper reads the body as abc. The request should be rejected, according to RFC 7230, since the ABNF for Content-Length only allows for DIGITs. This is due to using the FromStr implementation for u64 in the standard library. By differing from the spec, it is possible to send requests like these to endpoints that have different HTTP implementations, with different interpretations of the payload semantics, and cause "desync attacks".
In this particular case, an upstream proxy would need to error when parsing the Content-Length, but not reject the request (swallowing its own error), and forwarding the request as-is with the Content-Length still included. Then the upstream proxy and hyper would disagree on the length of the request body. The combination of these factors would be extremely rare.
Read more about desync attacks: https://portswigger.net/research/http-desync-attacks-request-smuggling-reborn
Impact
To determine if vulnerable, all these things must be true:
- Using hyper as an HTTP server. While the lenient decoder also exists in the client, a vulnerability does not exist around responses.
- Using HTTP/1. The HTTP/2 code uses a stricter parser.
- Using a vulnerable HTTP proxy upstream to hyper. If an upstream proxy correctly rejects the illegal
Content-Lengthheader, OR can parse the length with the plus sign, the desync attack cannot succeed.
Patches
We have released the following patch versions:
- v0.14.10 (to be released when this advisor is published)
Workarounds
Besides upgrading hyper, you can take the following options:
- Reject requests manually that contain a plus sign prefix in the
Content-Lengthheader. - Ensure any upstream proxy handles
Content-Lengthheaders with a plus sign prefix.
Credits
This issue was initially reported by Mattias Grenfeldt and Asta Olofsson.
- Record
GHSA-f3pg-qwvg-p99c- CVSS 3.1
- 3.1 Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N - Weakness
- CWE-444
- Updated
- 2026-11-02
OSVRUSTSEC-2021-0078
5.3
Lenient `hyper` header parsing of `Content-Length` could allow request smuggling
hyper's HTTP header parser accepted, according to RFC 7230, illegal contents inside Content-Length headers.
Due to this, upstream HTTP proxies that ignore the header may still forward them along if it chooses to ignore the error.
To be vulnerable, hyper must be used as an HTTP/1 server and using an HTTP proxy upstream that ignores the header's contents
but still forwards it. Due to all the factors that must line up, an attack exploiting this vulnerability is unlikely.
- Record
RUSTSEC-2021-0078- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N - Updated
- 2026-11-02
OSVUBUNTU-CVE-2021-32715
3.1
hyper is an HTTP library for rust. hyper's HTTP/1 server code had a flaw that incorrectly parses and accepts requests with a Content-Length header with a prefixed plus sign, when it should have been rejected as illegal. This combined with an upstream HTTP proxy that doesn't parse such Content-Length headers, but forwards them, can result in "request smuggling" or "desync attacks". The flaw exists in all prior versions of hyper prior to 0.14.10, if built with rustc v1.5.0 or newer. The vulnerability is patched in hyper version 0.14.10. Two workarounds exist: One may reject requests manually that contain a plus sign prefix in the Content-Length header or ensure any upstream proxy handles Content-Length headers with a plus sign prefix.
- Record
UBUNTU-CVE-2021-32715- CVSS 3.1
- 3.1 Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N - CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N - Updated
- 2026-11-02
OSVopenSUSE-SU-2024:11751-1 No score
afterburn-5.0.0-6.1 on GA media
These are all security issues fixed in the afterburn-5.0.0-6.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:11751-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
hypercrates.io |
before 0.14.10 | 0.14.10 |
rust-hyperDebian:12 |
before 0.14.19-1 | 0.14.19-1 |
rust-hyperDebian:13 |
before 0.14.19-1 | 0.14.19-1 |
rust-hyperDebian:14 |
before 0.14.19-1 | 0.14.19-1 |
hypercrates.io |
0.0.0-0 up to 0.14.10 | 0.14.10 |
rust-hyperUbuntu:20.04:LTS |
All versions, plus listed versions 0.12.35-1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| facts | ||
| aliases, products | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-32715 is a low vulnerability (CVSS 3.1) in Hyper, published July 7, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.13%, the 66th percentile. Fixed in hyper 0.14.10.
References
github.com/hyperium/hyper/security/advisories/GHSA-f3pg-qwvg-p99c
github.com/rust-lang/rust/pull/28826/commits/123a83326fb95366e94a3be1a74775df4db97739
nvd.nist.gov/vuln/detail/CVE-2021-32715
rustsec.org/advisories/RUSTSEC-2021-0078.html
github.com/hyperium/hyper/commit/1fb719e0b61a4f3d911562a436a2ff05fd7cb759
github.com/advisories/GHSA-f3pg-qwvg-p99c
Show 12 moreShow less
security-tracker.debian.org/tracker/CVE-2021-32715
github.com/hyperium/hyper
crates.io/crates/hyper
ubuntu.com/security/CVE-2021-32715
cve.org/CVERecord?id=CVE-2021-32715
suse.com/security/cve/CVE-2020-35905
suse.com/security/cve/CVE-2020-36465
suse.com/security/cve/CVE-2021-27378
suse.com/security/cve/CVE-2021-32714
suse.com/security/cve/CVE-2021-32715
suse.com/security/cve/CVE-2021-38191
suse.com/security/cve/CVE-2021-45710