Closed dcepelik closed 2 years ago
Wow, @dcepelik ,
Thanks for pointing this out! It looks important! π€©π€©π€©ππ»ππ»ππ»
I bet that finding this issue wasn't easy ππ»ππ»ππ»
I think this issue could have raised some interesting security concerns if iodine was used as a proxy instead of an application server (header smuggling could occur if whitespace removal was performed)...
I'm off to read more about this issue and see what I can do to fix it.
Cheers, Bo.
Hey @boazsegev, I have found a couple more issues while doing due diligence on Iodine. Please let me know if I can provide more details.
I think this issue could have raised some interesting security concerns if iodine was used as a proxy instead of an application server (header smuggling could occur if whitespace removal was performed)...
If multiple HTTP-aware components are stacked and at least two disagree about the meaning of the message, problems are bound to happen. I was specifically looking for ways to smuggle requests in and found unrelated issues.
Hi @dcepelik ,
When coding iodine I made the (poor?) assumption that it would always "hide" behind nginx, so I omitted some conformity tests from the parser (assuming these would be handled before the request arrives).
However, you are right in your approach and I am working on a fix for these issues. Since the parser is written in C, I might also consider replacing it with an open source (MIT licensed) alternative, especially if it is fast and keeps the same behavior (i.e., converts header names to lower case, allow UTF-8 header names, etc').
Very nice and creative work on attempting all these attack vectors and variations ππ»
System Information
Description
The HTTP parser is in violation of RFC7230Β§3.2.4:
The parser seems unaware of the existence of this problem, and making a request with obs-fold results in multiple headers seen by Iodine.
Rack App to Reproduce
Testing code
Expected behavior
The request should either be discarded with HTTP/400, or header folding should be processed correctly, as per the linked RFC.
Actual behavior
The request is accepted and the response is
demonstrating that the rest of the value of header X was understood as a header with name
β£A
, which is incorrect.