python3-h2: fix CVE-2026-71554
PATCH 1/1 python3-h2: fix CVE-2026-71554
From: Ashishkumar Parmar <[email protected]>
This patch applies the upstream h2 4.4.1 backport for CVE-2026-71554. The upstream fix commit is referenced in [1], and the public CVE advisory is referenced in [2].
[1] https://github.com/python-hyper/h2/commit/292a40829feefda98c8509dcdbbb4a57af9bd6a6
[2] https://github.com/python-hyper/h2/security/advisories/GHSA-6hr6-w5qg-qmwg
Signed-off-by Ashishkumar Parmar <[email protected]>
--- .../python-h2/python3-h2/CVE-2026-71554.patch | 37 +++++++++++++++++++ .../python-h2/python3-h2_4.3.0.bb | 1 + 2 files changed, 38 insertions(+) create mode 100644 meta-python/recipes-connectivity/python-h2/python3-h2/CVE-2026-71554.patch
meta-python/recipes-connectivity/python-h2/python3-h2/CVE-2026-71554.patch new file +37 -0
@@ -0,0 +1,37 @@ +From ee1c64859fcb622f7cc3f0ff428c915ce6448e9b Mon Sep 17 00:00:00 2001 +From: SunandM <[email protected]> +Date: Mon, 3 Aug 2026 13:28:23 +0200 +Subject: [PATCH] reject duplicate Host headers in request headers + +Duplicate Host headers are now rejected with a ProtocolError. +This addresses a request smuggling primitive where a consumer +downgrading HTTP/2 to HTTP/1.1 would emit two Host header lines, +causing backend divergence (CWE-444). + +The _validate_host_authority_header() function now counts Host +headers and raises ProtocolError if more than one is present, +covering both the receive path (_check_host_authority_header) +and the send path (_check_sent_host_authority_header). + +CVE: CVE-2026-71554 +Upstream-Status: Backport [https://github.com/python-hyper/h2/commit/292a40829feefda98c8509dcdbbb4a57af9bd6a6] + +Signed-off-by: Ashishkumar Parmar <[email protected]> +--- + src/h2/utilities.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/h2/utilities.py b/src/h2/utilities.py +index a7409b3..85e7771 100644 +--- a/src/h2/utilities.py ++++ b/src/h2/utilities.py +@@ -427,6 +427,9 @@ def _validate_host_authority_header(headers: Iterable[Header]) -> Generator[Head + if header[0] == b":authority": + authority_header_val = header[1] + elif header[0] == b"host": ++ if host_header_val is not None: ++ msg = "Request header block has multiple Host headers." ++ raise ProtocolError(msg) + host_header_val = header[1] + + yield header
meta-python/recipes-connectivity/python-h2/python3-h2_4.3.0.bb +1 -0
@@ -4,6 +4,7 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=aa3b9b4395563dd427be5f022ec321c1" +SRC_URI += "file://CVE-2026-71554.patch" SRC_URI[sha256sum] = "6c59efe4323fa18b47a632221a1888bd7fde6249819beda254aeca909f221bf1" inherit ptest-python-pytest pypi python_setuptools_build_meta
Signature · 1 line
2.35.6