Making HTTP header injection critical via response queue poisoning
A path-based request header injection on a front-end server let the attacker inject a second request and keep the back-end connection alive, turning the flaw into HTTP request smuggling. By crafting a prefix that combined with trailing junk, the attacker intermittently received responses meant for other authenticated users, proving critical impact.
Published on portswigger.net
HTTP header injection is often under-estimated and misclassified as a moderate severity flaw equivalent to XSS or worse, Open Redirection. In this post, I'll share a simple technique I used to take a header injection vulnerability, make it critical, and earn a $12,500 bounty.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
This write-up describes a technique for turning an HTTP header injection into a critical-severity HTTP desync, specifically response queue poisoning. The author is James Kettle, Director of Research at PortSwigger, and the article was published on 22 September 2022 and updated on 26 September 2022. The bounty earned was $12,500.
The target is described only as a major, high-traffic site serving critical functionality, referred to throughout the original as 'redacted.net'. The report does not name the site, the program, or the affected product. The vulnerability was a path-based request header injection on a front-end server. The technique the author describes applies both to request header injection on front-end servers and to response header injection on back-end servers.

Setup
The author did not find this vulnerability himself. A stranger, credited as xorb, emailed him a path-based request header injection and asked for ideas on exploitation. The reporter had agreed to a 50/50 bounty split if the author could help turn it into something exploitable. The target was under a bug bounty program known for competitive payouts.
The author notes that he does not typically engage with such emails, because the reporter has usually got stuck on something genuinely unexploitable. Two things made this case different: he had long suspected that header injection vulnerabilities could be upgraded into request smuggling, and the target was on a competitive bounty program.
The report does not list tool versions, accounts, or roles. The only precondition visible in the text is that the injection point sits in the request path and that a front-end server forwards the request to a back-end.
Finding it
The reporter's original demonstration showed a path-based request header injection. The author reproduces it as follows:
GET /%20HTTP/1.1%0d%0aHost:%20redacted.net%0d%0a%0d%0a HTTP/1.1Host: redacted.netHTTP/1.1 200 OKGET /%20HTTP/1.1%0d%0anothost:%20redacted.net%0d%0a%0d%0a HTTP/1.1Host: redacted.netHTTP/1.1 400 Bad Request
In this block the injected %0d%0a sequences in the path introduce a Host header (or, in the second case, a nothost header) into the request as seen by the back-end. The first variant returns HTTP/1.1 200 OK; the second returns HTTP/1.1 400 Bad Request.
What made this look worth pursuing was the author's prior suspicion that header injection could be upgraded into request smuggling. The injection itself is normally classified as a moderate issue, comparable to XSS or open redirection. The rest of the article is about moving it into a different class.
Exploitation
The concept, as the author puts it, is simple: convert a request header injection into a more serious HTTP desync in a few steps.
Step 1: exit the injection context cleanly
First, identify where the injection is occurring and add whatever is necessary to cleanly exit the context:
GET /%20HTTP/1.1%0d%0a%0d%0a HTTP/1.1HTTP/1.1 400 Bad RequestConnection: close
The injected %0d%0a%0d%0a terminates the headers of the request being built inside the path. The response shown is HTTP/1.1 400 Bad Request with Connection: close. That closed connection is the problem the next step addresses.
Step 2: keep the back-end connection open
Next, inject the essential headers to ensure the back-end keeps the connection open after responding to the initial request:
Here the injected block includes Host: redacted.net and Connection: keep-alive, followed by the blank line that ends the headers. The response is HTTP/1.1 200 OK with Connection: keep-alive. With the connection held open, the attacker can specify a second request fully under their control, which is the setup for a classic request smuggling attack.
The author notes the one significant difference from classic smuggling: the server appends additional headers or a body after the injection, so the injected request has to account for that trailing data.
Step 3: choose a cross-user exploitation strategy
The author presents two of the many options for cross-user exploitation.
The first is to specify a malicious prefix that poisons either the next user's request or a web cache:
In this variant the injected second request is GET /redirplz HTTP/1.1 with Host: oastify.com, followed by a Content-Length: 50 header and a blank line.
The second option, which the author chose, is to craft the prefix so that it combines with the trailing junk to create a complete second request, triggering response queue poisoning:
Here the injected second request is GET / HTTP/1.1 with a Foo: bar header. The author does not spell out the exact trailing data in the original, but the idea is that the server's appended headers or body complete the request rather than corrupt it.
Step 4: observe the result
With the second option, the author intermittently received responses intended for other authenticated users. He describes having a screenshot showing this, but states that he was unable to get permission to name the target, so the screenshot is not reproduced in the article.
This was sufficient to prove critical impact. The target patched the issue in under 24 hours and awarded a $12,500 bounty.
Root cause
The original does not describe the vulnerable code or the exact parsing mistake. What it does show is a path-based request header injection on a front-end server. That is a request header injection on the front-end. The author describes converting the injection into an HTTP desync in a few steps.
Why existing defences did not stop it is only implied. The author notes that header injection is often under-estimated and misclassified as a moderate flaw equivalent to XSS or open redirection, which suggests that the injection was treated as a low-impact finding rather than as a stepping stone to a desync.
Impact
Under the conditions shown, an attacker who can inject into request headers on a front-end server can smuggle a second request to the back-end. With the response queue poisoning variant, the author intermittently received responses intended for other authenticated users.
The author is careful about conditions. The technique applies to request header injection on front-end servers and to response header injection on back-end servers. If the site has no front-end, the techniques will not work as-is, though a client-side desync may still be achievable. The author suspects some major front-end servers have a similar mechanism, which would mitigate response queue poisoning.
Response header injection and the stacked-response problem
The author then turns to response header injection. Upgrading it into a desync is sometimes similarly straightforward, but other times it mysteriously fails. He recently discovered a defence mechanism that he believes explains this, and that hints at a possible solution.
When web browsers read a response and encounter more data than the server promised in the Content-Length header, they truncate the response and close the connection. He dubbed this the stacked-response problem, and found it made exploiting client-side desync vulnerabilities tougher but not impossible.
He now suspects that some major front-end servers have a similar mechanism, with two security implications:
- Regular desync attacks are unaffected, but response queue poisoning is mitigated.
- It is difficult to convert response header injection into an HTTP desync.
If attempts at causing a desync via response header injection fail, the reader may have encountered this mechanism. To bypass it, the injected response needs to be delayed so that the front-end's over-read does not see it. One possible approach is to inject a large number of newlines, which are typically consumed by servers without triggering request or response processing. The author states that this aspect needs further research, and offers to help anyone who gets stuck on a bug bounty program with this challenge.
Fix
The report states only that the target patched the issue in under 24 hours.
Variants to test
The author lists two closely related posts for readers who run into issues applying the technique:
- Response queue poisoning in Jira.
- HTTP request smuggling using CRLF injection.
Concrete things to try on other targets, drawn from the steps above:
- Inject a bare
%0d%0a%0d%0ain the path and check whether the response changes to a400withConnection: close. - Add
HostandConnection: keep-aliveto the injected block and check for200 OKwithConnection: keep-alive. - Inject a second request with a
Content-Lengthsized to absorb the server's trailing data, as in theoastify.comexample, and watch the out-of-band host. - Inject a second request designed to combine with the trailing junk, as in the
GET / HTTP/1.1withFoo: barexample, and check whether responses intended for other users appear. - On response header injection, if the desync fails, try injecting a large number of newlines to delay the injected response past the front-end's over-read.
- If the site has no front-end, the request-side techniques will not work as-is; consider whether a client-side desync is achievable instead.
Final notes
The author suspects these techniques used to be known but were forgotten alongside HTTP request smuggling. That, he suggests, explains why some people refer to response header injection as 'response splitting' even though they never actually split the response. He points readers to a deeper exploration of forgotten security knowledge in a separate article, and invites readers to share their success with the techniques.

What happened, in plain words
A security researcher called James Kettle, who works at PortSwigger as Director of Research, wrote this article. It was published on 22 September 2022 and updated on 26 September 2022. In it he explains how he took a bug that most people would call "moderate" and turned it into something serious enough to earn a $12,500 bounty.
The bug was a header injection. To understand that, you first need to know what a header is. When your browser talks to a website, it sends a short text message called an HTTP request. The first line says what page you want, for example GET / HTTP/1.1. After that come lines called headers, which are simple Name: value pairs. They carry extra information: which website you meant (Host), what kind of browser you use (User-Agent), whether the connection should stay open (Connection), and so on. A blank line marks the end of the headers, and after that may come a body (for example, the data you typed into a form).
A header injection means an attacker can sneak extra header lines into a request that the server did not intend to receive. On its own that sounds mild, and it is often treated as being about as serious as cross-site scripting (XSS, where an attacker gets their own code to run in someone else's browser) or open redirection (where a site is tricked into sending visitors to another site). The article argues that this underestimates the bug badly.
The trick the author describes is to use the injected headers to create a second, hidden request that the server processes as if it came from someone else. This is called request smuggling, and when it goes further it becomes response queue poisoning: the server gets its replies out of step, so one user can receive the response that was meant for a different user. That is how a moderate bug becomes critical.
The target is never named. The article calls it 'redacted.net' and describes it only as a major, high-traffic site serving critical functionality. The report does not name the bug bounty program or the affected product either. The vulnerability was a path-based request header injection on a front-end server. The technique applies both to request header injection on front-end servers and to response header injection on back-end servers.

Setup
The author did not find this bug himself. A stranger, credited as xorb, emailed him a path-based request header injection and asked whether he had any ideas for exploiting it. The reporter had agreed to a 50/50 split of any bounty if the author could help turn it into something exploitable. The target was on a bug bounty program known for competitive payouts. A bug bounty program is a scheme where a company pays people who report security bugs to it, instead of punishing them.
The author says he does not usually engage with emails like this, because the person writing has normally got stuck on something that genuinely cannot be exploited, and he has no trick to offer. Two things made this case different: he had long suspected that header injection vulnerabilities could be upgraded into request smuggling, and the target was on a competitive bounty program.
The report does not list tool versions, accounts, or roles. The only precondition visible in the text is that the injection point sits in the request path and that a front-end server forwards the request to a back-end.
It helps to picture the setup. Big websites rarely have one computer doing everything. Usually a front-end server sits at the edge and receives requests from the public, and a back-end server behind it does the real work. The front-end passes requests along to the back-end. Think of a receptionist at a hotel who takes your request and passes a note to the person actually doing the job. If you can write extra lines on that note, the person doing the job may act on things the receptionist never meant to pass on.
Finding it
The reporter's original demonstration showed a path-based request header injection. The author reproduces it as follows:
GET /%20HTTP/1.1%0d%0aHost:%20redacted.net%0d%0a%0d%0a HTTP/1.1Host: redacted.netHTTP/1.1 200 OKGET /%20HTTP/1.1%0d%0anothost:%20redacted.net%0d%0a%0d%0a HTTP/1.1Host: redacted.netHTTP/1.1 400 Bad Request
Line by line, in plain words:
GET /%20HTTP/1.1%0d%0aHost:%20redacted.net%0d%0a%0d%0a HTTP/1.1is the request the attacker sends. The path (the part afterGET) contains encoded characters.%20is a space.%0d%0ais a carriage return followed by a line feed, which is the standard way to end a line in HTTP. So the attacker is putting line breaks, and therefore extra header lines, inside the path.Host: redacted.netis the header the attacker is trying to inject.Hosttells the server which website the request is for.HTTP/1.1 200 OKis the response the server gave: success.- The second half repeats the idea with
nothost:%20redacted.netinstead ofHost.nothostis a made-up header name, used as a test. HTTP/1.1 400 Bad Requestis the response to that second attempt: the server rejected it.
Why this matters: the injected %0d%0a sequences in the path introduce a Host header (or, in the second case, a nothost header) into the request as seen by the back-end. The first variant returns HTTP/1.1 200 OK; the second returns HTTP/1.1 400 Bad Request.
What made this look worth pursuing was the author's prior suspicion that header injection could be upgraded into request smuggling. The injection itself is normally classified as a moderate issue, comparable to XSS or open redirection. The rest of the article is about moving it into a different class.
Exploitation
The concept, as the author puts it, is simple: convert a request header injection into a more serious HTTP desync in a few steps. A desync (short for desynchronisation) is when two servers in a chain disagree about where one request ends and the next begins. Picture two people reading the same letter but disagreeing about where one sentence stops and the next starts: each acts on a different meaning, and confusion follows.
Step 1: exit the injection context cleanly
First, identify where the injection is occurring and add whatever is necessary to cleanly exit the context:
GET /%20HTTP/1.1%0d%0a%0d%0a HTTP/1.1HTTP/1.1 400 Bad RequestConnection: close
Line by line:
GET /%20HTTP/1.1%0d%0a%0d%0a HTTP/1.1is the request. The path contains a space (%20), thenHTTP/1.1, then two line breaks (%0d%0a%0d%0a). Two line breaks in a row are the blank line that marks the end of the headers.HTTP/1.1 400 Bad Requestis the response: the server rejected the request as malformed.Connection: closeis a header in the response telling the client that the connection is being closed.
Why this step was taken: the injected %0d%0a%0d%0a terminates the headers of the request being built inside the path. The response shown is HTTP/1.1 400 Bad Request with Connection: close. That closed connection is the problem the next step addresses. If the connection closes after every request, there is no room to slip a second request in behind the first.
Step 2: keep the back-end connection open
Next, inject the essential headers to ensure the back-end keeps the connection open after responding to the initial request:
Line by line:
GET /%20HTTP/1.1%0d%0aHost:%20redacted.net%0d%0aConnection:%20keep-alive%0d%0a%0d%0a HTTP/1.1is the request. Inside the path the attacker has written a complete little block of headers:Host: redacted.net, thenConnection: keep-alive, then a blank line.Connection: keep-aliveasks the server not to hang up after replying, so the same connection can carry more requests. Think of it as asking the receptionist to keep the phone line open rather than ending the call.HTTP/1.1 200 OKis the response: success.Connection: keep-alivein the response confirms the server agreed to keep the connection open.
Why this step was taken: with the connection held open, the attacker can specify a second request fully under their control, which is the setup for a classic request smuggling attack. The author notes the one significant difference from classic smuggling: the server appends additional headers or a body after the injection, so the injected request has to account for that trailing data. In other words, the attacker's hidden request is not the last thing on the wire; the server's own leftovers come after it, and the attacker has to plan around them.
Step 3: choose a cross-user exploitation strategy
The author presents two of the many options for cross-user exploitation. Cross-user means the attack affects other people using the site, not just the attacker.
The first is to specify a malicious prefix that poisons either the next user's request or a web cache:
Line by line:
- The first part, up to the blank line, is the same as step 2: a request whose path smuggles in
Host: redacted.netandConnection: keep-alive. GET%20/redirplz%20HTTP/1.1is the start of a second, hidden request: a request for the path/redirplz.Host:%20oastify.comsets theHostheader of that hidden request tooastify.com. An out-of-band check is like leaving a marked envelope with a friend to see whether it gets delivered.Content-Length:%2050is a header on the hidden request.- The final blank line ends the headers.
Why this step was taken: this variant poisons either the next user's request or a web cache. A web cache is a store that keeps copies of responses so they can be served faster to later visitors; if an attacker can put a wrong response into it, many users get the wrong thing. This variant poisons either the next user's request or a web cache.
The second option, which the author chose, is to craft the prefix so that it combines with the trailing junk to create a complete second request, triggering response queue poisoning:
Line by line:
- Again the first part smuggles
Host: redacted.netandConnection: keep-aliveinto the request. GET%20/%20HTTP/1.1starts a hidden request for the site's root path,/.Foo:%20baris a made-up header on that hidden request. It is a marker, not a real header.- The request ends there; the attacker relies on the server's own trailing data to finish the hidden request.
Why this step was taken: here the injected second request is GET / HTTP/1.1 with a Foo: bar header. The author does not spell out the exact trailing data in the original, but the idea is that the server's appended headers or body complete the request rather than corrupt it. Response queue poisoning is the result: the back-end's replies get out of step with the requests, so a reply meant for one user is handed to another. Think of two people at a counter whose orders get swapped: each receives what the other asked for.
Step 4: observe the result
With the second option, the author intermittently received responses intended for other authenticated users. Authenticated means logged in, so those responses could contain another person's private data. He describes having a screenshot showing this, but states that he was unable to get permission to name the target, so the screenshot is not reproduced in the article.
This was sufficient to prove critical impact. The target patched the issue in under 24 hours and awarded a $12,500 bounty.
Root cause
The original does not describe the vulnerable code or the exact parsing mistake. What it does show is a path-based request header injection on a front-end server. CRLF stands for carriage return and line feed, the two characters that end a line in HTTP; %0d%0a is their encoded form. A delimiter is a character or sequence that marks a boundary, like the full stop at the end of a sentence. That is a request header injection on the front-end. The author describes converting the injection into an HTTP desync in a few steps.
Why existing defences did not stop it is only implied. The author notes that header injection is often under-estimated and misclassified as a moderate flaw equivalent to XSS or open redirection, which suggests that the injection was treated as a low-impact finding rather than as a stepping stone to a desync.
Impact
Under the conditions shown, an attacker who can inject into request headers on a front-end server can smuggle a second request to the back-end. With the response queue poisoning variant, the author intermittently received responses intended for other authenticated users.
The author is careful about conditions. The technique applies to request header injection on front-end servers and to response header injection on back-end servers. If the site has no front-end, the techniques will not work as-is, though a client-side desync may still be achievable. A client-side desync is a related problem where the confusion happens in the browser rather than between two servers. The author suspects some major front-end servers have a similar mechanism, which would mitigate response queue poisoning.
Response header injection and the stacked-response problem
The author then turns to response header injection. This is the mirror image of what we have seen: instead of sneaking headers into a request, the attacker sneaks headers into a response. Upgrading it into a desync is sometimes similarly straightforward, but other times it mysteriously fails. He recently discovered a defence mechanism that he believes explains this, and that hints at a possible solution.
When web browsers read a response and encounter more data than the server promised in the Content-Length header, they truncate the response and close the connection. Content-Length is the header that says how big the body is; if more arrives than promised, the browser stops reading. He dubbed this the stacked-response problem, and found it made exploiting client-side desync vulnerabilities tougher but not impossible.
He now suspects that some major front-end servers have a similar mechanism, with two security implications:
- Regular desync attacks are unaffected, but response queue poisoning is mitigated.
- It is difficult to convert response header injection into an HTTP desync.
If attempts at causing a desync via response header injection fail, the reader may have encountered this mechanism. To bypass it, the injected response needs to be delayed so that the front-end's over-read does not see it. An over-read is when a server reads past the end of the response it expected, picking up bytes that belong to the next one. One possible approach is to inject a large number of newlines, which are typically consumed by servers without triggering request or response processing. In plain terms, you pad the smuggled response with blank lines so it arrives later than the front-end is looking. The author states that this aspect needs further research, and offers to help anyone who gets stuck on a bug bounty program with this challenge.
Fix
The report states only that the target patched the issue in under 24 hours.
Variants to test
The author lists two closely related posts for readers who run into issues applying the technique:
- Response queue poisoning in Jira.
- HTTP request smuggling using CRLF injection.
Concrete things to try on other targets, drawn from the steps above:
- Inject a bare
%0d%0a%0d%0ain the path and check whether the response changes to a400withConnection: close. The baseline is the normal response you get before trying anything, used for comparison. - Add
HostandConnection: keep-aliveto the injected block and check for200 OKwithConnection: keep-alive. - Inject a second request with a
Content-Lengthsized to absorb the server's trailing data, as in theoastify.comexample, and watch the out-of-band host. - Inject a second request designed to combine with the trailing junk, as in the
GET / HTTP/1.1withFoo: barexample, and check whether responses intended for other users appear. - On response header injection, if the desync fails, try injecting a large number of newlines to delay the injected response past the front-end's over-read.
- If the site has no front-end, the request-side techniques will not work as-is; consider whether a client-side desync is achievable instead.
Final notes
The author suspects these techniques used to be known but were forgotten alongside HTTP request smuggling. That, he suggests, explains why some people refer to response header injection as 'response splitting' even though they never actually split the response. He points readers to a deeper exploration of forgotten security knowledge in a separate article, and invites readers to share their success with the techniques.

Glossary
- API: a defined way for one piece of software to ask another for something, like a menu of requests a service accepts.
- Authenticated: logged in, so the server knows who you are and may return private data.
- Back-end server: the computer behind the front-end that does the real processing.
- Baseline: the normal response before any tampering, used for comparison.
- Bug bounty program: a scheme where a company pays people who report security bugs to it.
- Cache poisoning: putting a wrong or malicious response into a shared web cache so later visitors receive it.
- Client-side desync: a desync where the confusion happens in the browser rather than between two servers.
- Content-Length: a header stating how many bytes long the body of a message is.
- CRLF: carriage return plus line feed, the two characters that end a line in HTTP; encoded as
%0d%0a. - Cross-user: affecting other people using the site, not just the attacker.
- Delimiter: a character or sequence marking a boundary, such as the end of a line or of a header block.
- Desync (desynchronisation): when two servers disagree about where one request ends and the next begins.
- Front-end server: the server at the edge that receives requests from the public and forwards them to the back-end.
- Header: a
Name: valueline in an HTTP request or response carrying extra information. - Header injection: sneaking extra header lines into a request or response that the server did not intend.
- Host: the header that says which website a request is for.
- HTTP: the language browsers and servers use to exchange requests and responses.
- HTTP request: the message a browser sends to ask a server for something.
- HTTP response: the message a server sends back.
- Open redirection: a flaw where a site can be tricked into sending visitors to another site.
- Out-of-band: using a separate server you control to observe whether something happened.
- Over-read: a server reading past the end of the response it expected and picking up the next one's bytes.
- Path: the part of a URL after the site name, such as
/redirplz. - Request smuggling: hiding a second request inside the first so the server processes it as if from someone else.
- Response header injection: sneaking extra header lines into a response.
- Response queue poisoning: a desync where replies get out of step, so one user receives another user's response.
- Response splitting: an older name for response header injection, even when the response is not actually split.
- Stacked-response problem: browsers truncating a response that is longer than its
Content-Lengthpromised, and closing the connection. - Web cache: a store of copies of responses, used to serve later visitors faster.
- XSS (cross-site scripting): a flaw where an attacker gets their own code to run in someone else's browser.