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
Although the line terminator for the start-line and header fields is the sequence CRLF, a recipient MAY recognize a single LF as a line terminator and ignore any preceding CR.
But it appears the parser is using \r and \n almost interchangeably.
Very nice smuggling opportunity here if you can get the other layer to ignore this part :) 👏🏻👏🏻👏🏻
The second request issue is a no-brainer must fix.
But the first request...? I'm not sure that's a parsing error or a standard error.
HTTP/2 allows for a wider range of HTTP header values. I think an \r in the middle of a value is acceptable when routed through HTTP/2... so if we want this parser to accept headers from an HTTP/2 reverse proxy (i.e., nginx), isn't this the expected behavior?
More importantly does this expose possible attack vectors...?
System Information
Description
The HTTP parser is in violation of RFC7230§3.2:
Also, in 3.5. Message Parsing Robustness:
But it appears the parser is using \r and \n almost interchangeably.
Rack App to Reproduce
Testing code
First example
Second example
Expected behavior
In the first example, the request should be discarded, as \r is not a valid field-vchar as per the RFC.
In the second example, it would be safest to discard the request (and close connection to the client).
Actual behavior
First example
The request is accepted and the output of the command above is:
demonstrating that the \r has become part of the value of the header
U
.Second example
The \r\n\r sequence is understood as a terminator for the request, resulting in two requests being handled by Iodine:
The text was updated successfully, but these errors were encountered: