HTTP/1.1 header field lines must be terminated with either CRLF or bare LF. Lwan terminates header field lines with CR followed by anything. This is usable for request smuggling when Lwan is deployed behind a reverse proxy that forwards bare CR in header field lines.
For example, Lwan sees one request in the following payload, where it should either see two requests or reject the message:
POST / HTTP/1.1\r\n
Host: a\rX
Content-Length: 31\r\n
\r\n
GET /evil HTTP/1.1\r\n
Host: a\r\n
\r\n
The bug
HTTP/1.1 header field lines must be terminated with either CRLF or bare LF. Lwan terminates header field lines with CR followed by anything. This is usable for request smuggling when Lwan is deployed behind a reverse proxy that forwards bare CR in header field lines.
For example, Lwan sees one request in the following payload, where it should either see two requests or reject the message:
What other servers do
Respond 400:
See two requests:
Close the connection without responding: