Injection
CRLF Injection
CRLF injection happens when untrusted input containing carriage-return and line-feed characters (\r\n, %0d%0a) is written into an HTTP response header, a redirect Location, a log line, an email header or a raw protocol stream. The attacker can add headers, set cookies, split a response, or inject a body. Many frameworks now reject bare CR/LF in header values, but custom proxies, older stacks, URL parsers and non-HTTP protocols still fail.
- 58 payloads
- 1 file
- README on GitHub
Payloads are read from main at 35c1f2b (committed 22 Nov 2026). Project version 1.0.2.
These payloads are for authorized testing only: systems you own, authorized bug bounty programs, or controlled lab environments. Unauthorized testing is illegal.
Payload files
Use the arrow keys to move between payloads. Press Enter or C to copy the focused payload.
crlf-injection-payloads.txt
58 payloads · 3.8 KBLoading payloads for CRLF Injection…
Common Attack Vectors#
- Reflected parameters in
Location,Set-Cookie,Content-Dispositionand custom response headers - Redirect and language/locale parameters (
?lang=,?next=,?return=) - Header-to-header propagation through proxies and
X-Forwarded-*handling - Request splitting against HTTP/1.1 clients in SSRF paths (URL host, path or user-info containing CRLF)
- Unicode characters that normalise or truncate to CR/LF (
%E5%98%8A%E5%98%8D) - Email, SMTP, IMAP, Redis and Memcached text protocols reached through SSRF or injection (see
Email-Injection/andSSRF/) - Log forging (see
Log-Injection/)
Testing Approach#
Inject a harmless marker header (X-Injected: crlf-marker) and check whether it appears in the response headers or on a downstream hop, not just reflected in the body. Test every encoding the stack might decode once: raw, single URL-encoded, double URL-encoded, and Unicode forms. Inspect the raw response in a proxy; browsers hide split headers. Confirm that a cookie set through injection actually reaches the browser jar before reporting session fixation. For response splitting, verify against a fixture because modern servers normally block it.
References#
Responsible Use
All content in this reference is for authorized security testing only. Use only on systems you own or have explicit written permission to test.
- Systems and applications you own
- Authorized penetration testing engagements
- Bug bounty programs with defined scope
- Educational lab environments (DVWA, WebGoat, HackTheBox)