CRLF Injection
Summary
CRLF Injection allows an attacker to inject malicious CR and LF characters into application inputs, leading to potential HTTP response splitting, session hijacking, or cache poisoning.
Testing methodology
Description
CRLF (Carriage Return Line Feed) Injection is a vulnerability that occurs when an attacker can inject CR and LF characters into application inputs, which can manipulate the behavior of HTTP responses or headers. Attackers can exploit this vulnerability to perform HTTP response splitting attacks, session hijacking, or cache poisoning, potentially leading to unauthorized access, sensitive information leakage, or malicious content injection.
Remediations
- Implement strict input validation and sanitization to block CRLF characters.
- Encode or sanitize user input before using it in HTTP responses or headers.
- Use a secure framework or library that automatically handles encoding and sanitization of user input.
- Regularly update and patch the web application's underlying software.
Usually follows
Affected components
- Client Side