CVE-2026-71554
Multiple Host headers accepted, causing HTTP request smuggling.
- CVSS 5.3
- CWE-444
- Input Validation and Sanitization
- Remote
h2 is a pure-Python implementation of a HTTP/2 protocol stack. Versions up to and including 4.4.0 accept request header blocks containing more than one Host header, and forward 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, providing a request smuggling primitive. This issue is fixed in version 4.4.1.
- CWE
- CWE-444
- CVSS base score
- 5.3
- Published
- 2026-08-06
- OWASP
- A04 Insecure Design
- Orthogonal defect classification
- Checking
- Code defect classification
- Missing Check
- Category
- Input Validation and Sanitization
- Subcategory
- Insecure Parsing or Deserialization
- Accessibility scope
- Remote
- Impact
- Unauthorized Access
- Affected component
- h2
- Fixed by upgrading
- Yes
Solution
Upgrade h2 to version 4.4.1.
Vulnerable code sample
import h2.connection
import h2.events
def handle_request(data: bytes):
conn = h2.connection.H2Connection()
conn.receive_data(data)
# VULNERABLE: allow multiple Host headers to be forwarded
headers = {}
for event in conn.events():
if isinstance(event, h2.events.RequestReceived):
for name, value in event.headers:
# Store each header; duplicate 'host' keys overwrite but later logic may join them
if name in headers:
# naive concatenation mimics forwarding all Host headers
headers[name] = f"{headers[name]}, {value}"
else:
headers[name] = value
# downstream receives the raw headers dict
process_downstream(headers)
def process_downstream(headers):
# placeholder for application logic
passPatched code sample
import h2.connection
import h2.events
def handle_request(data: bytes):
conn = h2.connection.H2Connection()
conn.receive_data(data)
# FIX: enforce a single Host header
headers = {}
host_seen = False
for event in conn.events():
if isinstance(event, h2.events.RequestReceived):
for name, value in event.headers:
lname = name.lower()
if lname == b'host':
if host_seen:
# ignore subsequent Host headers
continue
host_seen = True
# store header normally
if lname not in headers:
headers[lname] = value
process_downstream(headers)
def process_downstream(headers):
# placeholder for application logic
passPublished fix
Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.
- reject duplicate Host headers in request headers (python-hyper/h2)
src/h2/utilities.py · _validate_host_authority_header
Cite this entry
@misc{vaitp:cve202671554,
title = {{Multiple Host headers accepted, causing HTTP request smuggling.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-71554},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-71554/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
