Skip to content
OpenAdvisories
Low · 3.1 CVE-2021-32715 EUVD-2021-1461GHSA-f3pg-qwvg-p99cRUSTSEC-2021-0078

Lenient Parsing of Content-Length Header When Prefixed with Plus Sign

Published Jul 7, 2021 · Updated Aug 3, 2024 · Assigned by GitHub_M

Description

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.

Affected products

VendorProductAffectedFixed
hyperium hyper < 0.14.10 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 rust-hyper 0.14.19-1 —
Debian 13 rust-hyper 0.14.19-1 —
Debian 12 rust-hyper 0.14.19-1 —
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS rust-hyper No fix yet —

Affected packages

EcosystemPackageAffectedFixedRecord
crates.io hyper < 0.14.10 0.14.10 GHSA-f3pg-qwvg-p99c
crates.io hyper >= 0.0.0-0, < 0.14.10 0.14.10 RUSTSEC-2021-0078

References