---
title: "CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers"
url: https://radicalnotion.ai/cwe/cwe-113
type: cwe
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."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers

- **Abstraction:** Variant
- **Structure:** Simple
- **Status:** Incomplete
- **CVEs with this as primary weakness:** 127
- **Of those, in CISA KEV:** 0
- **New in 2026:** 56
- **CWE catalog version:** 4.21

## 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.

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.

## Alternate terms

- HTTP Request Splitting
- HTTP Response Splitting

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | - |

## Applicable platforms

**Technologies:** Web Based (Undetermined), Web Server (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| 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 (Input Validation)

Construct HTTP headers very carefully, avoiding the use of non-validated input data.

### Implementation (Input Validation)

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 (Output Encoding)

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 (Input Validation)

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.)

Effectiveness: High

## Demonstrative examples

### Example 1

The following code segment reads the name of the author of a weblog entry, author, from an HTTP request and sets it in a cookie header of an HTTP response.

Bad code:

```java
String author = request.getParameter(AUTHOR_PARAM);
...
Cookie cookie = new Cookie("author", author);
cookie.setMaxAge(cookieExpiration);
response.addCookie(cookie);
```

Result code:

```
HTTP/1.1 200 OK
...
Set-Cookie: author=Jane Smith
...
```

Attack code:

```
Wiley Hacker\r\nHTTP/1.1 200 OK\r\n
```

Result code:

```
HTTP/1.1 200 OK
...
Set-Cookie: author=Wiley Hacker
HTTP/1.1 200 OK
...
```

### Example 2

An attacker can make a single request to a vulnerable server that will cause the server to create two responses, the second of which may be misinterpreted as a response to a different request, possibly one made by another user sharing the same TCP connection with the server.

Cross-User Defacement can be accomplished by convincing the user to submit the malicious request themselves, or remotely in situations where the attacker and the user share a common TCP connection to the server, such as a shared proxy server.

In the best case, an attacker can leverage this ability to convince users that the application has been hacked, causing users to lose confidence in the security of the application.

In the worst case, an attacker may provide specially crafted content designed to mimic the behavior of the application but redirect private information, such as account numbers and passwords, back to the attacker.

### Example 3

The impact of a maliciously constructed response can be magnified if it is cached, either by a web cache used by multiple users or even the browser cache of a single user.

Cache Poisoning: if a response is cached in a shared web cache, such as those commonly found in proxy servers, then all users of that cache will continue to receive the malicious content until the cache entry is purged. Similarly, if the response is cached in the browser of an individual user, then that user will continue to receive the malicious content until the cache entry is purged, although the user of the local browser instance will be affected.

### Example 4

Once attackers have control of the responses sent by an application, they have a choice of a variety of malicious content to provide users.

Cross-Site Scripting: cross-site scripting is common form of attack where malicious JavaScript or other code included in a response is executed in the user's browser.

The variety of attacks based on XSS is almost limitless, but they commonly include transmitting private data like cookies or other session information to the attacker, redirecting the victim to web content controlled by the attacker, or performing other malicious operations on the user's machine under the guise of the vulnerable site.

The most common and dangerous attack vector against users of a vulnerable application uses JavaScript to transmit session and authentication information back to the attacker who can then take complete control of the victim's account.

### Example 5

In addition to using a vulnerable application to send malicious content to a user, the same weakness can also be leveraged to redirect sensitive content generated by the server to the attacker instead of the intended user.

Page Hijacking: by submitting a request that results in two responses, the intended response from the server and the response generated by the attacker, an attacker can cause an intermediate node, such as a shared proxy server, to misdirect a response generated by the server to the attacker instead of the intended user.

Because the request made by the attacker generates two responses, the first is interpreted as a response to the attacker's request, while the second remains in limbo. When the user makes a legitimate request through the same TCP connection, the attacker's request is already waiting and is interpreted as a response to the victim's request. The attacker then sends a second request to the server, to which the proxy server responds with the server generated request intended for the victim, thereby compromising any sensitive information in the headers or body of the response intended for the victim.

## Observed examples

| CVE | Description |
| --- | --- |
| 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 |

## Real CVEs with this weakness (sample of 12 of 127)

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2026-73117 | Apache Juneau: Response header CRLF injection and open redirect when applications set headers or redirect targets from request data | critical | 10.0 | - | No | 2026-11-05 |
| CVE-2026-38967 | - | critical | 9.8 | - | No | 2026-06-02 |
| CVE-2019-25101 | OnShift TurboGears HTTP Header controllers.py response splitting | critical | 9.8 | - | No | 2023-02-04 |
| CVE-2026-67289 | FreeRDP before 3.29.0 HTTP Proxy Request Injection via Redirection | critical | 9.3 | - | No | 2026-08-01 |
| CVE-2021-0268 | Junos OS: J-Web has an Improper Neutralization of CRLF Sequences in its HTTP Headers which allows an attacker to carry out multiple types of attacks. | critical | 9.3 | - | No | 2021-04-22 |
| CVE-2026-105324 | An HTTP header injection vulnerability was found in the ADM | critical | 9.2 | - | No | 2026-10-07 |
| CVE-2026-42035 | Axios: Header Injection via Prototype Pollution | critical | 9.1 | - | No | 2026-04-24 |
| CVE-2025-53007 | arduino-esp32 vulnerable to CRLF injection in WebServer.cpp | high | 8.9 | - | No | 2025-06-26 |
| CVE-2026-75419 | - | high | 8.8 | - | No | 2026-08-27 |
| CVE-2025-55271 | HCL Aftermarket DPC is affected by HTTP Response Splitting vulnerability | high | 8.8 | - | No | 2026-03-26 |
| CVE-2024-52875 | - | high | 8.8 | - | No | 2025-01-31 |
| CVE-2023-32708 | HTTP Response Splitting via the ‘rest’ SPL Command | high | 8.8 | - | No | 2023-06-01 |

## Related attack patterns (CAPEC)

- [CAPEC-105](https://radicalnotion.ai/capec/capec-105): HTTP Request Splitting
- [CAPEC-31](https://radicalnotion.ai/capec/capec-31): Accessing/Intercepting/Modifying HTTP Cookies
- [CAPEC-34](https://radicalnotion.ai/capec/capec-34): HTTP Response Splitting
- [CAPEC-85](https://radicalnotion.ai/capec/capec-85): AJAX Footprinting

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-20](https://radicalnotion.ai/cwe/cwe-20) | Improper Input Validation |
| Parent | [CWE-93](https://radicalnotion.ai/cwe/cwe-93) | Improper Neutralization of CRLF Sequences |
| Parent | [CWE-436](https://radicalnotion.ai/cwe/cwe-436) | Interpretation Conflict |
| Can precede | [CWE-79](https://radicalnotion.ai/cwe/cwe-79) | Improper Neutralization of Input During Web Page Generation |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| PLOVER | HTTP response splitting | - | - |
| 7 Pernicious Kingdoms | HTTP Response Splitting | - | - |
| WASC | HTTP Response Splitting | 25 | - |
| Software Fault Patterns | Tainted input to command | SFP24 | - |

## Frequently asked questions

### What is CWE-113?

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.

### What CVEs are caused by CWE-113?

127 recorded CVEs are attributed to CWE-113, including CVE-2026-73117, CVE-2026-38967 and CVE-2019-25101.

### How do you prevent CWE-113?

Construct HTTP headers very carefully, avoiding the use of non-validated input data.

### How is CWE-113 detected?

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.)

### What are the consequences of CWE-113?

Exploiting CWE-113 can lead to: Modify Application Data, Gain Privileges or Assume Identity.

### Is CWE-113 actively exploited?

127 recorded CVEs are caused by CWE-113; none are currently in CISA's KEV catalog of actively exploited flaws.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/113.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-113). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
