HTTP/2 header field values containing CR, LF or NUL are passed to the application unvalidated in Bandit
mtrudel bandit
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| mtrudel bandit |
| No fix yet |
| mtrudel bandit |
| No fix yet |
Original description
Improper Neutralization of CRLF Sequences ('CRLF Injection') vulnerability in mtrudel bandit allows an unauthenticated remote attacker to smuggle CR, LF, or NUL characters into application-visible request headers via HTTP/2. Bandit.HTTP2.Stream.read_headers/1 validates pseudo-header placement and uniqueness, header-name casing, connection-specific headers, the te value, and content-length, but never checks field values. Because HPACK carries arbitrary octets, a HEADERS block whose field values contain \r, \n, or \0 decodes without error and the values land in conn.req_headers unchanged. The HTTP/1 path already rejects the same octets; HTTP/2 did not.