Tips

CRLF and header injection tips

CRLF and header injection put line breaks into HTTP headers, letting an attacker add headers, set cookies or split the response. It turns up in redirects and anywhere input is written into a header.

Published tips, newest first. Payloads and commands are shown as plain text.

  • Test header injection for CRLF desync

    If you find HTTP request header injection, try exploiting it with CRLF-powered desync attacks. Send a request with a CRLF sequence in the Host header to see if the target desynchronizes. You can use a tool like Burp to automate the attack. Look for a response that indicates the…

    CRLF and header injectionExploitation

CRLF and header injection: how to hunt it

Where to look

  • Redirect parameters and paths copied into the Location header.
  • Encoded line breaks (%0d%0a, %0a and Unicode variants) that survive decoding.
  • Headers built from input, such as file names in Content-Disposition.
  • Email headers in contact forms, which can add recipients: send only to addresses you own.

What proves it

Show the injected header or cookie in the raw response, and explain where it leads, such as session fixation or XSS through a split response.

Read further

Writeups on CRLF and header injection, by hunters and researchers, most with a short summary.

Related classes