1 Header Injection via CRLF
HTTP headers are terminated by carriage return + line feed (CRLF: \r\n). When user input is placed in a response header without stripping CRLF characters, attackers can inject additional headers or even a second HTTP response body.
Vulnerable redirect (PHP):
$redirect = $_GET["url"];
header("Location: " . $redirect);An attacker sends: https://example.com/%0d%0aSet-Cookie:%20session=evil
This produces the response headers:
Location: https://example.com/
Set-Cookie: session=evilCache poisoning: By injecting a full second response body, attackers can poison shared caches with malicious content served to all users. This is known as HTTP Response Splitting.