The HTTP protocol uses CRLF sequences to end headers, lines and so on. When input vectors are reflected in the HTTP responses, if attackers can inject CRLF sequences, they can craft an arbitrary HTTP response. For example, this could lead to reflected XSS as the attackers would have the ability to inject arbitrary HTML content in the response.
Testers need to find input vectors that could be reflected in HTTP responses.
GET or POST parameters (like
For example, in the following request line, the GET parameter
page is not sanitized enough and a CRLF sequence (
%0D%0A) can be injected.
GET /index.php?question=answer%0D%0AInjection:%20Pwned%0D%0A HTTP/1.1
Injection header is then reflected in the HTTP response, right after the legitimate
HTTP/1.1 200 OK[...]X-Custom-Question: answerInjection: Pwned[...]
A CRLF injection vulnerable input vector can lead to HTTP response splitting that can in turn lead to
Sensitive Information Disclosure
The following payload injects two headers and a
script tag in the body.