CWEweakness
CWE-113 Improper Neutralization of CRLF Sequences in HTTP Headers
- Alternate terms
- HTTP Request Splitting, HTTP Response Splitting
- Abstraction
- Variant
- Structure
- Simple
- Status
- Incomplete
- Languages
- Not Language-Specific
- CWE version
- 5.0
Description
The product receives data from an HTTP agent/component (e.g., web server, proxy, browser, etc.), but it does not neutralize or incorrectly neutralizes CR and LF characters before the data is included in outgoing HTTP headers.
Extended description
HTTP agents or components may include a web server, load balancer, reverse proxy, web caching proxy, application firewall, web browser, etc. Regardless of the role, they are expected to maintain coherent, consistent HTTP communication state across all components. However, including unexpected data in an HTTP header allows an attacker to specify the entirety of the HTTP message that is rendered by the client HTTP agent (e.g., web browser) or back-end HTTP agent (e.g., web server), whether the message is part of a request or a response.
When an HTTP request contains unexpected CR and LF characters, the server may respond with an output stream that is interpreted as "splitting" the stream into two different HTTP messages instead of one. CR is carriage return, also given by %0d or \r, and LF is line feed, also given by %0a or \n.
In addition to CR and LF characters, other valid/RFC compliant special characters and unique character encodings can be utilized, such as HT (horizontal tab, also given by %09 or \t) and SP (space, also given as + sign or %20).
These types of unvalidated and unexpected data in HTTP message headers allow an attacker to control the second "split" message to mount attacks such as server-side request forgery, cross-site scripting, and cache poisoning attacks.
Common consequences
• Integrity, Access Control: Modify Application Data, Gain 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.
Potential mitigations
• [Implementation] Construct HTTP headers very carefully, avoiding the use of non-validated input data.
• [Implementation] Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. If an input does not strictly conform to specifications, reject it or transform it into something that conforms.
When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
• [Implementation] Use and specify an output encoding that can be handled by the downstream component that is reading the output. Common encodings include ISO-8859-1, UTF-7, and UTF-8. When an encoding is not specified, a downstream component may choose a different encoding, either by assuming a default encoding or automatically inferring which encoding is being used, which can be erroneous. When the encodings are inconsistent, the downstream component might treat some character or byte sequences as special, even if they are not special in the original encoding. Attackers might then be able to exploit this discrepancy and conduct injection attacks; they even might be able to bypass protection mechanisms that assume the original encoding is also being used by the downstream component.
• [Implementation] Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.
Detection methods
• Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Observed examples
• CVE-2020-15811: Chain: Proxy uses a substring search instead of parsing the Transfer-Encoding header (CWE-697), allowing request splitting (CWE-113) and cache poisoning
• CVE-2021-41084: Scala-based HTTP interface allows request splitting and response splitting through header names, header values, status reasons, and URIs
• CVE-2018-12116: Javascript-based framework allows request splitting through a path option of an HTTP request
• CVE-2004-2146: Application accepts CRLF in an object ID, allowing HTTP response splitting.
• CVE-2004-1656: Shopping cart allows HTTP response splitting to perform HTML injection via CRLF in a parameter for a url
• CVE-2005-2060: Bulletin board allows response splitting via CRLF in parameter.
• CVE-2004-2512: Response splitting via CRLF in PHPSESSID.
• CVE-2005-1951: e-commerce app allows HTTP response splitting using CRLF in object id parameters
Related
Attack pattern · CAPEC (4)
Observed example · CVE (8)
- CVE-2021-41084 http4s is an open source scala interface for HTTP. vulnerability
- CVE-2020-15811 An issue was discovered in Squid before 4.13 and 5.x before 5.0.4. vulnerability
- CVE-2018-12116 Node.js: All versions prior to Node.js 6.15.0 and 8.14.0: HTTP request splitting: If Node.js can be convinced to use unsanitized… vulnerability
- CVE-2005-2060 Multiple HTTP Response Splitting vulnerabilities in (1) toggleshow.php, (2) togglecats.php, and (3) showprofile.php in Infopop UBB.Threads… vulnerability
- CVE-2005-1951 Multiple HTTP Response Splitting vulnerabilities in osCommerce 2.2 Milestone 2 and earlier allow remote attackers to spoof web content and… vulnerability
- CVE-2004-2146 CRLF injection vulnerability in PD9 Software MegaBBS 2 and 2.1 allows attackers to conduct HTTP response splitting attacks via the fid… vulnerability
- CVE-2004-2512 CRLF injection vulnerability in calendar.php in DCP-Portal 5.3.2 and earlier allows remote attackers to conduct HTTP response splitting… vulnerability
- CVE-2004-1656 CRLF injection vulnerability in Comersus Shopping Cart 5.0991 allows remote attackers to perform HTTP Response Splitting attacks to modify… vulnerability
Can precede · CWE (1)
- CWE-79 Improper Neutralization of Input During Web Page Generation weakness
Child of · CWE (3)
Referenced by CAPEC · weakness (4)
Referenced by CVE · weakness (128)
- CVE-2026-112880 Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting') vulnerability in hackney_http_connect in… vulnerability
- CVE-2026-55486 The Goobi viewer is a web application that allows digitised material to be displayed in a web browser. vulnerability
- CVE-2026-103930 cpp-httplib is a C++ header-only HTTP/HTTPS library. vulnerability
- CVE-2026-85976 Progress MarkLogic Server 12.x releases before 12.1.0 and 11.x releases before 11.3.7 do not sufficiently sanitize input used by the Query… vulnerability
- CVE-2026-105324 An HTTP header injection vulnerability in start-page-loader.cgi of ADM allows an unauthenticated remote attacker to read arbitrary files on… vulnerability
- CVE-2026-106512 The CakeResponse::download() method in lib/Cake/Network/CakeResponse.php constructs a Content-Disposition header by directly interpolating… vulnerability
- CVE-2026-93711 Dancer2 versions before 2.2.0 for Perl do not strip CR and LF from response header names in headers_to_array. vulnerability
- CVE-2026-94216 A vulnerability was determined in ST Engineering iDirect iDX and Evo iDX. vulnerability
- CVE-2026-85077 Sanic is an opensource python web server/framework. vulnerability
- CVE-2026-77360 oRPC is an tool that helps build APIs that are end-to-end type-safe and adhere to OpenAPI standards. vulnerability
- CVE-2024-58384 Tornado before 6.4.1 contains a CRLF injection vulnerability in CurlAsyncHTTPClient that fails to reject carriage return and line feed… vulnerability
- CVE-2026-69211 Http4s is a Scala interface for HTTP services. vulnerability
- CVE-2026-91991 Tornado before 6.5.8 contains an incomplete fix for cookie attribute injection that allows attackers to inject arbitrary cookie attributes… vulnerability
- CVE-2026-90819 A weakness has been identified in a2aproject a2a-java 1.2.0. vulnerability
- CVE-2026-2811 The Ajaxify Comments WordPress plugin before 3.2 is vulnerable to HTTP Header Injection due to insufficient input sanitization and output… vulnerability
- CVE-2026-75419 go-wind-cms (GoWind) before 1.0.0 has a missing authorization vulnerability. vulnerability
- CVE-2026-77341 cpp-httplib is a C++ header-only HTTP/HTTPS library. vulnerability
- CVE-2026-59314 Applications that build a Content-Disposition header value from untrusted input may be vulnerable to HTTP response splitting when the input… vulnerability
- CVE-2026-39915 TIM Flow before 26.0.6 contains a CRLF injection vulnerability that allows remote attackers to inject arbitrary HTTP headers and response… vulnerability
- CVE-2026-50576 ePA 3.x Integration implements the authorization workflow and writes Medical Information Objects to Germany's electronic patient record. vulnerability
- CVE-2026-67289 FreeRDP before 3.29.0 (affected versions <= 3.28.0) does not validate CRLF and control characters in the server-controlled RDP redirection… vulnerability
- CVE-2026-66746 Rouille 0.4.0 through 3.6.2 contains an HTTP response splitting vulnerability that allows remote attackers to inject arbitrary response… vulnerability
- CVE-2026-66753 tiny-http through 0.12.0 contains an HTTP header injection vulnerability that allows attackers to inject carriage return (0x0D) and line… vulnerability
- CVE-2026-63771 Adminer before 5.4.3 contains a cookie injection vulnerability that allows attackers to manipulate cookie attributes by injecting arbitrary… vulnerability
- CVE-2026-54163 secure_headers manages application of security headers with many safe defaults. vulnerability
- CVE-2025-62675 An Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Response Splitting') vulnerability [CWE-113] vulnerability in Fortinet… vulnerability
- CVE-2025-62826 An Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Response Splitting') vulnerability [CWE-113] vulnerability in Fortinet… vulnerability
- CVE-2026-50188 Kirby is an open-source content management system. vulnerability
- CVE-2025-71381 Hono before 4.10.2 (fixed in 4.10.3) contains a flaw in its CORS middleware: when the origin is not set to "*", the middleware copies the… vulnerability
- CVE-2026-55766 guzzlehttp/psr7 is a PSR-7 HTTP message library implementation in PHP. vulnerability
Referenced by CWE · has member (1)
- CWE-884 CWE Cross-section view