CVE-2026-75484
Bandit versions 1.4.0 through 1.12.5 accept arbitrary octets — including carriage return, line feed, and null bytes — in HTTP/2 header values after HPACK decoding, while the same library's HTTP/1 path correctly rejects these bytes. This is not a forgotten port of a check; it reflects a conceptual gap where developers applied content validation to HTTP/1 (because \r\n has meaning in that protocol) but treated HTTP/2 header values as opaque data that needed only structural validation (pseudo-header ordering, uniqueness, connection-specific exclusions). HPACK's "arbitrary octets" design amplified this: the codec never raises errors on bytes that would be immediately rejected in HTTP/1, creating a surface that looks safe by construction. The immediate security impact on Bandit itself is low — Plug blocks response splitting, and Bandit's own logging uses fixed strings. However, Bandit is middleware, and downstream applications consume header values assuming they arrived clean. If your application concatenates header values into log entries, constructs filenames from Host headers, or forwards headers to backends, you are operating on crafted input you never expected. The implicit contract — "received from a protocol-aware library, therefore sanitized" — is broken. The partial fix for :authority duplicates illustrates the same pattern. Bandit validated :method, :scheme, and :path for uniqueness but missed :authority, creating an inconsistency where the connection-level view (first :authority wins for conn.host) and the application-level view (subsequent :authority remains in req_headers) disagree. What you should do: Audit code paths that consume header values from Bandit for injection-sensitive operations (log concatenation, file I/O, SQL construction, shell commands). If you forward header values to other services, apply your own canonicalization (stripping control characters) at those boundaries. The CVSS 6.9 score reflects Bandit's direct exploitability, not the blast radius of downstream trust assumptions — weight that accordingly when prioritizing remediation.
Reviewed through automated stages and approved by a human before publication.