You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
h1: forbidden fields and unbounded count in chunked request trailers #1701
Found in the review of #1695. Measured on main at 9e55ad621db2a4f738f7a0ec54401f7f8e3e8291.
#1695 removes spoofable forwarding fields (X-Forwarded-*, Forwarded, X-Real-IP, X-Request-Id) from HTTP/1 chunked request trailers (elide_request_trailer_spoof_vectors in lib/src/protocol/kawa_h1/editor.rs). Every other trailer field is still forwarded verbatim, including fields RFC 9110 §6.5.1 forbids in trailers because they control framing, routing or authentication — Content-Length, Transfer-Encoding, Host, Authorization, Content-Type, etc. — and nothing bounds the number of trailer fields, unlike the H2 path which is capped by max_header_fields. The advisory Trailer: request header also still names fields that are now dropped.
Risk: a backend that merges trailers into headers can be fed framing or routing fields the client could not set in the header section; a client can send an unbounded number of trailer lines (bounded only by the buffer).
Proposal: drop (or reject) trailer fields that RFC 9110 §6.5.1 lists as not allowed in trailers on the H1 request path, apply a trailer field-count limit consistent with H2, and decide whether the Trailer: header should be pruned of dropped names. Tests: editor and e2e (backend must not receive the forbidden trailer fields; over-limit trailers are refused with a defined status).
Activity
fix(h1): drop forbidden fields from chunked request trailers and boun…
fix(mux-h2): drop forbidden fields from H2 request trailers and count…