This vulnerability occurs when an application accepts user-supplied data and includes it directly in HTTP headers without properly filtering out carriage return (CR) and line feed (LF) characters. This allows an attacker to inject new headers or split a single HTTP response into two separate responses, corrupting the intended communication flow.
HTTP request/response splitting happens when untrusted data, often from user input in an HTTP request, flows into an outgoing HTTP response header without validation. Attackers can inject CR (%0d or \r) and LF (%0a or \n) characters—or other separators like tabs and spaces—to break the header structure. The receiving agent (like a browser or proxy) then interprets the injected characters as the end of one header and the start of a new one, effectively splitting a single response into two distinct, attacker-influenced messages. This manipulation of the HTTP stream enables several serious attacks. By controlling the second, forged response, an attacker can perform cross-site scripting (XSS), poison web caches to serve malicious content to other users, or trick the server into making unauthorized internal requests (SSRF). The core issue is a failure to sanitize separator characters before data is placed in headers, breaking the trust between interconnected HTTP components like servers, proxies, and browsers.
Impact: Modify Application DataGain Privileges or Assume Identity
CR and LF characters in an HTTP header may give attackers control of the remaining headers and body of the message that the application intends to send/receive, as well as allowing them to create additional messages entirely under their control.
Strategy: Input Validation
Strategy: Input Validation
Strategy: Output Encoding
Strategy: Input Validation
javabashbashbash