GHSA-6hr6-w5qg-qmwg: Medium severity pip/h2 vulnerability
Impact h2 <=4.4.0 accepts request header blocks containing more than one Host header, and forwards every Host header to the consuming application. Where the consumer downgrades HTTP/2 to HTTP/1.1, the resulting request carries two Host header lines, which is a request smuggling primitive (CWE-444).
Patches Patched and fixed in v4.4.1
Workarounds Users of the h2 library are advised to check and follow HTTP semantics best practices in their application code. h2 provides best effort sanity checks, but ultimately the calling code is responsible to ensure proper and safe usage of HTTP/2 as provided by h2, hyperframe, and hpack.
References Similar to the previously disclosed and fixed duplicate content-length issue.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/h2to a version that resolves this vulnerability.Fixed in 4.4.1 - Upgrade
Upgrade
h2to a version that resolves this vulnerability.Fixed in 4.4.1 - Configuration
In the application code that consumes HTTP/2 requests from h2, follow HTTP semantics best practices so requests do not contain multiple Host header lines. This prevents the request smuggling primitive described for cases where HTTP/2 is downgraded to HTTP/1.1.
h2-based HTTP/2 consumer application Host header handling = Ensure exactly one Host header is present per request (no duplicate Host headers).
Event History
Frequently Asked Questions
What is the severity of GHSA-6hr6-w5qg-qmwg?
The severity of GHSA-6hr6-w5qg-qmwg is medium, rated at 5.3.
What is the impact of GHSA-6hr6-w5qg-qmwg?
GHSA-6hr6-w5qg-qmwg allows multiple Host headers, which can lead to HTTP request smuggling.
How do I fix GHSA-6hr6-w5qg-qmwg?
To fix GHSA-6hr6-w5qg-qmwg, upgrade to a version of h2 higher than 4.4.0 that addresses this issue.
Which software is affected by GHSA-6hr6-w5qg-qmwg?
GHSA-6hr6-w5qg-qmwg affects the h2 library used in Python's pip package manager.
What protocols are involved in GHSA-6hr6-w5qg-qmwg?
GHSA-6hr6-w5qg-qmwg involves both HTTP/2 and HTTP/1.1 protocols.