Skip to content
Smuggling / CRLF Disclosed report Intermediate

HTTP Response Splitting (CRLF injection) due to headers overflow

A parameter reflected into a response header could be padded with a very long value, and once the header block exceeded roughly 7000 bytes the original response was discarded and a new one served that included an injected header. An attacker could therefore inject arbitrary response headers, such as a cookie, into the response.

File Descriptor Follow

Originally disclosed on HackerOne

  • Triaged in 31 hours
  • Fixed in 6 days
  • Paid in 10 days
  • Disclosed after 36 days

Summary by the researcher

Write-up: https://blog.innerht.ml/overflow-trilogy/

The report

Hi,

I would like to report another HTTP Response Splitting vulnerability caused by header fields "overflow" that allows attackers to inject arbitrary headers in the response. Note that this issue is similar to #52042 but the root cause is different. Also, the below PoC is not the only affected page. Any endpoint involves reflection of parameters in headers is vulnerable.

##PoC:

(If HTTP 500 occurs please refresh)

https://twitter.com/i/safety/report_story?next_view=report_story_start&source=reporttweet&reported_user_id=1&reporter_user_id=1&is_media=true&is_promoted=true&reported_tweet_id=+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++set-cookie:a

##Details:

The culprit is that when the response header fields exceed certain length (roughly >7000 bytes), the response will be discarded and a new one will be served instead. The new generated response will then contain the header injected.

The original report as published on HackerOne, by filedescriptor. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 8 min read.

Context

This report was filed against the X / xAI program on HackerOne and disclosed on 4 May 2015. It describes an HTTP response splitting vulnerability caused by what the researcher calls a header field "overflow", which lets an attacker inject arbitrary headers into a response.

The PoC URL is a report_story endpoint under /i/safety/. The URL carries the parameters next_view, source, reported_user_id, reporter_user_id, is_media, is_promoted and reported_tweet_id.

The researcher states that any endpoint involving reflection of parameters in headers is vulnerable. The researcher states that the PoC page is not the only affected one: any endpoint that reflects parameters in headers is vulnerable in the same way. The report also notes that the issue is similar to an earlier report, #52042, but that the root cause here is different.

Setup

The report describes no accounts, roles, tools or versions. The PoC is a plain URL, and the researcher gives no indication that authentication is needed to reach the report_story page or to trigger the behaviour. The only operational note is that an HTTP 500 may occur and that the page should be refreshed in that case:

(If HTTP 500 occurs please refresh)

That instruction matters for reproducing the issue: the first attempt can fail with a server error, and the researcher treats a retry as the normal way to get the vulnerable path to execute.

The report is explicitly linked to an earlier finding, #52042, which was also an HTTP response splitting issue. The researcher is careful to separate the two: the symptom is similar, but the mechanism is not. Here the cause is a header field "overflow", not whatever produced the earlier issue.

The researcher also sets the scope of the finding beyond the single URL: the PoC is not the only affected page, and any endpoint that reflects parameters into headers is vulnerable. No list of such endpoints is given, so the PoC is the only concrete instance shown.

Finding it

When the response header fields exceed a certain length, roughly more than 7000 bytes, the response is discarded and a new one is served in its place. The new generated response then contains the header that was injected.

That is the whole mechanism. When the header fields exceed roughly 7000 bytes, the response is discarded and a new one is served, and the new response contains the injected header. The researcher describes this as a header field "overflow", and the report's title names it the same way: HTTP Response Splitting (CRLF injection) due to headers overflow.

The observation is generalised immediately. The PoC page is not the only affected one, and any endpoint that involves reflection of parameters in headers is vulnerable. The report gives no inventory of those endpoints, so the single URL in the next section is the only concrete instance demonstrated.

For the full reasoning the researcher points to an external write-up:

Text
https://blog.innerht.ml/overflow-trilogy/

The report itself does not reproduce that write-up's contents, so the details of how the threshold was established are not in the text here. What the report does state is the condition (header fields beyond roughly 7000 bytes), the consequence (the response is discarded and a new one served) and the result (the new response carries the injected header).

Exploitation

The report contains a single proof of concept: one URL, with no separate request and response transcripts. The researcher presents the URL as the whole demonstration, and the mechanism is described in prose in the Details section rather than shown as captured traffic.

Step 1: the padded request

The PoC is a request to the safety report story page with every parameter filled in and one parameter, reported_tweet_id, padded to an extreme length:

Root cause

The fault is in how the server handles a response whose header fields grow beyond a certain size. The researcher's description is short and specific: when the response header fields exceed a certain length, roughly more than 7000 bytes, the response is discarded and a new one is served instead. The newly generated response then contains the header that was injected.

Two things have to be true at once for this to work, and the report shows both:

  1. A request parameter is reflected into a response header without adequate sanitisation, so the attacker controls part of the header block. The PoC URL ends with set-cookie:a after a long run of + characters.
  2. The reflected value is long enough to push the total header field length past the overflow threshold, roughly 7000 bytes. The long run of + characters in the URL exists to reach that size.

When the header block overflows, the server does not reject the request or truncate the headers. It throws the oversized response away and builds a replacement. The injected header, which was already part of the header block being assembled, is carried into that replacement response.

The report does not describe the server-side code, the exact threshold, or which component performs the discard and regeneration. The figure of roughly 7000 bytes is the researcher's own approximation, and the write-up linked in the report is where the reasoning behind it is set out; that reasoning is not reproduced in the report text.

The researcher is explicit that this is not the same bug as #52042, even though both are HTTP response splitting issues. The earlier report had a different root cause. Here the cause is the header field overflow and the discard-and-regenerate behaviour it triggers, not whatever mechanism produced the earlier finding. The report does not say what the root cause of #52042 was, only that it differs from this one.

Impact

The direct consequence is arbitrary header injection in the response. The PoC injects a set-cookie header, and the researcher states that arbitrary headers can be injected. The report shows set-cookie:a as the injected header and does not go further into what a real attacker would put there.

The researcher's own framing of scope is broad but hedged. That is a statement about the class of endpoints, not a list: the report names no other endpoint and demonstrates only the report_story URL. So the practical reach of the bug is as wide as the set of endpoints that reflect parameters into headers, and the report leaves that set undefined.

The conditions are the ones set out in the root cause. The endpoint must reflect a request parameter into a response header, and the attacker must be able to make the reflected value long enough to push the header fields past the overflow threshold of roughly 7000 bytes. In the PoC both are satisfied by a single parameter, reported_tweet_id, padded with a long run of + characters and terminated with the CRLF sequence and the header to inject.

What it establishes is the primitive: on a vulnerable endpoint, an attacker who controls a reflected header value can cause an arbitrary header, including a cookie, to appear in the response that the server ultimately serves.

Fix

The report contains no remediation section. Nothing in the text states what the vendor did in response, so there is no fix to describe here.

The only pointer to further detail is the external write-up linked in the report:

Text
https://blog.innerht.ml/overflow-trilogy/

The report does not reproduce that write-up's contents, so it gives no information about remediation beyond the disclosure itself.

Variants to test

The report gives one URL and one injected header, but the mechanism it describes is general, and the researcher says so: any endpoint that reflects parameters in headers is vulnerable. The variants below follow from the researcher's statement that any endpoint reflecting parameters in headers is vulnerable.

Other endpoints that reflect parameters into headers

The first thing to try is the same class of reflection on a different page.

A positive result is a response whose headers contain the value you supplied in the parameter, unchanged and unsanitised. That alone is the precondition; the overflow step is what turns it into splitting.

Padding to reach the overflow threshold

Once a reflected parameter is found, pad it until the total header field length passes roughly 7000 bytes, the figure the researcher gives. The PoC does this with a long run of + characters in reported_tweet_id, and the same approach applies to any reflected parameter: repeat a harmless character until the header block is large enough, then append the CRLF sequence and the header you want to inject.

A positive result is the behaviour described in the Details section: the oversized response is discarded, a new response is served, and the new response carries the injected header. Because the threshold is approximate, vary the padding length around it rather than assuming one exact size works.

Injecting headers other than set-cookie

The PoC injects set-cookie:a. The report's claim is arbitrary header injection, so the natural variant is to substitute a different header after the padding and confirm it appears in the regenerated response. A positive result is the same discard-and-regenerate behaviour with your chosen header present in the replacement response, which confirms the primitive is general rather than specific to cookies.

Retrying on server errors

The report notes that an HTTP 500 may occur and that the page should be refreshed. When testing a candidate endpoint, treat a 500 as inconclusive rather than a negative: repeat the request, as the researcher does, before concluding the overflow path is not reachable.

Hunting notes

The bug class hides wherever a request parameter is copied into a response header. The report does not enumerate such places, but it does state the rule that makes them interesting: any endpoint that involves reflection of parameters in headers is vulnerable.

Where to look

  • Redirect and return-URL handling, where a parameter becomes Location.
  • Safety, report and share pages, which carry many descriptive parameters and often set cookies or policy headers alongside the response.
  • Locale, language and view switches, where a parameter selects a variant and may be echoed back.
  • Any endpoint whose parameters are described as controlling the response rather than the page body.

Recon signals

The signal is a response header whose value matches something you sent. Send a distinctive marker in each parameter and inspect the full response header block, not just the body. If the marker appears in a header, the reflection precondition is met. The report gives no other detection method, and the threshold behaviour (roughly 7000 bytes) is only visible once you push the header block past that size.

Demonstrating impact

The researcher's demonstration is a single URL that combines the reflection with enough padding to trigger the overflow, and the injected header is set-cookie:a. That is the shape a report needs: a concrete endpoint, a parameter that reaches a header, padding that crosses the threshold, and an injected header visible in the regenerated response. The note that an HTTP 500 may occur, and that a refresh resolves it, is worth carrying into any reproduction steps so a triager does not read a transient error as a failed PoC.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 44 min read.

What happened, in plain words

This article walks through a bug bounty report filed by a researcher who goes by the handle filedescriptor. The report was filed against the X / xAI program on HackerOne, a platform where security researchers report bugs to companies and sometimes get paid for them. The report was disclosed to the public on 4 May 2015.

The bug was found on a report_story endpoint under /i/safety/. The researcher reports that the endpoint allows attackers to inject arbitrary headers in the response. Headers are the small pieces of information that travel alongside a web page, and one of the headers the researcher managed to inject was a cookie header.

The researcher calls the cause a header field "overflow". In plain terms: when the response headers grow past a certain size, roughly more than 7000 bytes, the server throws that response away and builds a new one. The new response still contains the header the attacker slipped in. So the attacker gets their header delivered even though the original response was discarded.

The report is short. It contains one proof of concept, a single long URL, and a few sentences of explanation. The researcher also points to an external write-up for the full reasoning:

Text
https://blog.innerht.ml/overflow-trilogy/

The report itself does not reproduce what that write-up says, so the details of how the researcher worked out the threshold are not in the report text. What the report does give us is the condition (headers beyond roughly 7000 bytes), the consequence (the response is discarded and a new one served) and the result (the new response carries the injected header).

The researcher also notes that this issue is similar to an earlier report, #52042, but that the root cause is different. The report does not say what the root cause of #52042 was, only that it differs from this one.

One more thing worth knowing before we go further: the researcher states that the page in the proof of concept is not the only affected one. Any endpoint that reflects parameters in headers is vulnerable in the same way. The report names no other endpoint, so the single URL is the only concrete example we have.

Background: the words you need first

Before the report itself makes sense, we need a handful of words. None of them are hard, but each one has a precise meaning, and the bug only becomes obvious once you have all of them. Take them in order, because each builds on the one before.

Request and response

When you type an address into your browser and press Enter, two things happen. Your browser sends a request to the server that hosts the site: a short message saying "please give me this page". The server sends back a response: the page itself, plus some extra information about it.

Think of it like ordering at a counter. You say what you want (the request), and the person behind the counter hands you a bag with your food in it (the response). The bag also has a receipt stapled to it, and the receipt is not the food. It is information about the food: what it is, when it was made, how to store it. That receipt is the part of the response we care about in this report.

Headers

The extra information that travels with a request or a response is made of headers. A header is a single line with a name, a colon, and a value:

That line says the response body is an HTML page. Other headers say how long the page is, when it was last changed, whether the browser is allowed to cache it, and so on. A response is therefore two parts: the headers (the receipt) and the body (the food).

Headers are written one per line, and the end of the headers is marked by a blank line. Everything after that blank line is the body. This detail is the heart of the bug, so keep it in mind.

Cookies

A cookie is a small piece of text that a website asks your browser to store and to send back on every later visit to that site. It is how a site remembers you between page loads. When you log in, the server typically sends a cookie containing a session identifier, and your browser presents that cookie on each subsequent request so the server knows it is still you.

The server sets a cookie by sending a response header called Set-Cookie:

Your browser reads that header, stores the value, and attaches it to future requests. The everyday comparison: a cookie is like a cloakroom ticket. The attendant gives you a ticket (the cookie), and when you come back you show the ticket and get your coat (your logged-in session). If someone else can hand you a ticket of their choosing, they can influence what coat you are given.

CRLF

CRLF stands for Carriage Return, Line Feed. It is the pair of invisible characters that marks the end of a line in many internet protocols, including HTTP. In a URL or a payload it is written as %0D%0A (the encoded forms of the two characters), and in the report's description it is referred to as a CRLF sequence.

Why it matters: because headers are separated by line breaks, a CRLF is the signal "this header line has ended, the next one begins". If you can get a CRLF into a place where the server did not expect one, you can end a header early and start a new one of your own. That is the whole trick behind the bug class in this report.

The everyday comparison: imagine a form where each answer goes on its own line. If you are only supposed to write your name, but you write your name, press Enter, and then write "and also give me the keys to the building", the person reading the form may treat the second line as a separate instruction. The CRLF is the Enter key.

HTTP response splitting

HTTP response splitting is the name for what happens when an attacker manages to insert that Enter key into a response. The attacker supplies a value that the server copies into a header without cleaning it. The value contains a CRLF, so the header ends early, and whatever comes after the CRLF is read by the browser as a brand new header, or even as the start of a new response.

The result is that the attacker controls part of the response that the server sends. They can add headers the server never intended to send. In this report, the header the researcher adds is a Set-Cookie header, which is exactly the cloakroom-ticket scenario above.

The name "splitting" comes from the idea that one response is split into two: the part the server meant to send, and the part the attacker appended.

Header overflow

The last word is the one specific to this report. A header overflow here does not mean a crash or a memory error. It means the response headers have grown past a size the server is willing to handle. The researcher's description is that when the response header fields exceed a certain length, roughly more than 7000 bytes, the response is discarded and a new one is served instead.

A byte is a unit of size for computer data; one character of ordinary text is usually one byte. So 7000 bytes is roughly 7000 characters of header text. That is a lot for headers, which are normally a few hundred bytes at most.

The everyday comparison: think of a form that only has room for a certain number of lines. If you write past the bottom of the form, the clerk does not squeeze your extra lines into the margin. They throw the form away and start a fresh one. The bug is that when the fresh form is started, the attacker's extra line is still on it.

That is the mechanism the report describes, and the next sections show how the researcher reached it and what the proof of concept looks like.

The feature being tested

The page in the report is a report_story endpoint under /i/safety/.

The particular page the researcher used is reached through an endpoint called report_story, which sits under the path /i/safety/. An endpoint is simply a specific address on a server that does one job. A website is made of many endpoints: one for the home page, one for search, one for logging in, one for reporting a tweet. Each has its own address, and each responds to requests sent to that address.

The full address in the proof of concept is a URL, the same kind of thing you type into your browser's address bar. What makes this URL unusual is the part after the question mark. Everything after the ? is called the query string, and it is a list of parameters: little name-and-value pairs, joined by & characters. Each pair looks like name=value.

Parameters are how a URL carries information. If you search a shop for shoes, the URL might end in ?search=shoes. The page reads the parameter and shows you shoes. In the same way, the report story page reads the parameters in its URL to know which report to show.

The URL in the proof of concept carries seven parameters: next_view, source, reported_user_id, reporter_user_id, is_media, is_promoted and reported_tweet_id.

Parameter What it describes
next_view Which screen of the reporting flow to show next
source Where the report came from, for example which part of the site sent the user here
reported_user_id The numeric identifier of the user being reported
reporter_user_id The numeric identifier of the user doing the reporting
is_media Whether the reported content is media, such as an image or video
is_promoted Whether the reported tweet is a promoted (advertising) tweet
reported_tweet_id The numeric identifier of the tweet being reported

A user ID and a tweet ID are just numbers that the site uses internally to refer to a particular account or a particular tweet. You never type them yourself in normal use; the site fills them in as you click through the flow. They are in the URL so that each screen knows exactly which report it is dealing with.

The important thing about these parameters, for this report, is that the page takes values from the URL and uses them while building its response. Most of the time that is harmless: the page shows the right screen for the right tweet. The bug appears when one of those values is copied into the response headers, the receipt that travels with the page, rather than only into the page body. The next sections show exactly how.

Setup and what you need

One of the nice things about this report is how little you need in order to follow it. There is no special software to install, no account to create, no particular browser to use and no version numbers to match. The report describes no accounts, no roles, no tools and no versions. The proof of concept is a plain URL, the same kind of address you type into your browser's address bar, and the researcher gives no indication that you have to be logged in to reach the report_story page or to trigger the behaviour.

That is worth pausing on, because it tells you something about the bug. Many security reports begin with a long section on how to set up an environment: create two accounts, install a proxy, configure a test server. This one does not. The whole demonstration is a single address. If you can use a browser and a computer, you can follow along with the reasoning.

The one operational note

There is exactly one practical instruction in the report, and it comes right before the proof of concept:

(If HTTP 500 occurs please refresh)

An HTTP 500 is a status code. Status codes are short numbers that a server sends back with every response to say how things went. You have probably seen one without knowing it: a "404 Not Found" page is the server telling you the address does not exist. A 500 means "Internal Server Error", which is the server's way of saying something went wrong on its side while it was trying to handle the request.

The researcher is warning you that the first attempt can fail with this server error, and that the fix is simply to refresh the page, that is, to send the same request again. That matters for anyone reproducing the issue: a 500 on the first try is not proof that the bug is absent. The researcher treats a retry as the normal way to get the vulnerable path to run. Keep that in mind if you ever try something like this yourself: a transient error is inconclusive, not a negative result.

The relationship to the earlier report

The report is explicitly linked to an earlier finding, numbered #52042. That earlier report was also an HTTP response splitting issue, the same general class of bug we met in the background section: an attacker getting a line break into a response and adding headers of their own.

The researcher is careful to separate the two. The symptom is similar, but the mechanism is not. Here the cause is a header field "overflow", the behaviour where an oversized header block is discarded and a fresh response is served with the injected header still in it. The earlier report had a different root cause. The report does not say what that root cause was, only that it differs from this one.

Why does this distinction matter so much? The researcher is therefore making a specific claim: same symptom, different path to it. That claim is the first thing a triager, the person who reviews incoming reports for the company, would check. If the two bugs really do have different root causes, this is a new report; if they do not, it is a repeat of #52042.

What the setup does not include

Beyond the retry note and the link to #52042, the report says nothing about the environment. The proof of concept stands on its own as a URL, and the explanation of why it works is given in prose rather than as captured network traffic. That is all the setup there is, and it is enough to move on to how the researcher found the behaviour in the first place.

Finding it: how the researcher got there

That is an important difference in approach, and it is worth spelling out for anyone new to this.

Most bug hunting begins with a feature: a search box, a login form, a redirect. You poke at the feature and see what it does with unexpected input. Here the researcher began one level lower, with the plumbing that every response goes through. The observation is this: when the response header fields exceed a certain length, roughly more than 7000 bytes, the response is discarded and a new one is served instead. The new generated response then contains the header that was injected.

Read that sentence slowly, because the whole report rests on it. Three things are happening in sequence:

  1. The server builds a response, including its headers.
  2. The headers turn out to be larger than the server is willing to send, roughly more than 7000 bytes.
  3. The server throws that response away and builds a fresh one, and the fresh one still carries the header the attacker slipped in.

Recall the background section: a byte is a unit of size, and one character of ordinary text is usually one byte. Normal headers are a few hundred bytes at most, so reaching this size takes deliberate effort. That effort is exactly what the long run of + characters in the proof of concept is for, as we will see in the next section.

The everyday comparison from before is worth repeating here because it fits so well: think of a clerk with a form that has room for a fixed number of lines. The bug is that when the fresh form is started, your extra line is still on it. The report states that when header fields exceed roughly 7000 bytes, the response is discarded and a new one served with the injected header.

Why this is a server behaviour, not a page bug

It helps to be clear about what kind of thing the researcher found. This is not a mistake in how one page displays a tweet, or in how one form validates an email address. It is a property of how the server handles responses whose headers grow too large. Any response that goes through that same handling is subject to the same behaviour.

That is why the researcher generalises immediately. The report says the proof of concept page is not the only affected one, and that any endpoint that involves reflection of parameters in headers is vulnerable. Let us unpack that sentence for a beginner.

Reflection means that the server takes a value you supplied in the request and copies it back out into the response. If you send ?name=Alice and the page says "Hello, Alice", the name has been reflected. Reflection is everywhere on the web, and most of the time it is harmless: it is how search pages show your search term, how error pages quote what you typed, and how forms remember your answers.

The dangerous case is when the reflection lands in the headers rather than the body. If a parameter you control ends up in a response header, then you control part of the header block. Combine that with the overflow behaviour, and you have the bug: you can make the header block large enough to trigger the discard-and-regenerate, and the value you control, including any line break you put in it, travels into the replacement response.

So the researcher's claim is broad but precise. It is not "this one page is broken". It is "any page that copies a parameter into a header is broken in the same way, because the overflow behaviour is shared". The report gives no list of such pages. The single URL in the proof of concept is the only concrete instance demonstrated, and the rest of the claim is left as a statement about the class of endpoints.

The external write-up

For the full reasoning, the researcher points to an external write-up rather than reproducing it in the report:

Text
https://blog.innerht.ml/overflow-trilogy/

This is a link to a blog post. The report does not reproduce the post's contents, so the details of how the researcher established the threshold, how they discovered the discard-and-regenerate behaviour in the first place, and what else they tried are not in the report text. What the report does state is the condition (header fields beyond roughly 7000 bytes), the consequence (the response is discarded and a new one served) and the result (the new response carries the injected header).

If you are following along as a beginner, this is a normal shape for a bug bounty report. The two serve different purposes, and the report deliberately keeps to the facts the company needs in order to verify and fix the issue.

What the researcher had, and what they did not

By the time the report was filed, the researcher had three things:

  • A behaviour: oversized header blocks are discarded and a new response is served.
  • A consequence: the new response contains the injected header.
  • A concrete instance: the report_story URL, which reflects a parameter into a header and lets the attacker pad it past the threshold.

What the researcher did not have, or at least did not put in the report, was a list of every other affected endpoint, a description of the server-side code, or an exact figure for the threshold. The figure of roughly 7000 bytes is the researcher's own approximation, and the report says so with the word "roughly". The reasoning behind that number lives in the linked write-up, not in the report.

That is the state of things as the report moves into its proof of concept. The next section walks through the single URL that demonstrates all of it, parameter by parameter, and explains what each part is doing.

Exploitation: the proof of concept

The report contains a single proof of concept: one URL, with no separate request and response transcripts. The researcher presents the URL as the whole demonstration, and the mechanism is described in prose in the Details section rather than shown as captured traffic. For a beginner, that means the URL itself has to carry the entire story, so it is worth reading it slowly, piece by piece, rather than skimming it.

Before we look at it, one reminder about what a URL is. A URL is the address you type into your browser's address bar. It has a part that names the site and the page, and then, optionally, a question mark followed by a list of name-and-value pairs. Those pairs are the parameters we met earlier. The browser sends the whole URL to the server, and the server's code reads the parameters to decide what to do.

The proof of concept is a request to the safety report story page with every parameter filled in and one parameter, reported_tweet_id, padded to an extreme length. That padding is the part that makes the URL look strange. It is also the part that makes the bug happen.

Step 1: the padded request

Here is the URL exactly as it appears in the report:

Root cause: why it works

We have seen the URL and what each part of it is trying to do. Now we need to understand why the server does what the researcher says it does. The root cause is the underlying reason a bug exists, as opposed to the symptom you see on screen. In this report the root cause is short enough to state in a couple of sentences, but it has two separate parts, and both have to be true at the same time for the attack to work.

The researcher's own description of the mechanism is this: when the response header fields exceed a certain length, roughly more than 7000 bytes, the response is discarded and a new one is served instead. The newly generated response then contains the header that was injected.

That is the whole of it. Everything else in this section is unpacking that sentence for someone who has not met these ideas before.

Condition one: a parameter that reaches a header

The first condition is that a request parameter is reflected into a response header without adequate cleaning. We met reflection in the previous section: the server takes a value you supplied and copies it back out into the response. The dangerous version is when the copy lands in the headers, the receipt that travels with the page, rather than in the body, the page itself.

Because the server does not clean the value properly, the attacker can put more than a number in there. The proof of concept URL ends with set-cookie:a.

Recall what CRLF means from the background section: it is the pair of invisible characters that marks the end of a line in HTTP. Headers are written one per line, so a CRLF is the signal "this header line has ended, the next one begins". If you can get a CRLF into a header value, you can end that header early and start a new one of your own. That is the injection half of the bug, and it is the same trick that gives HTTP response splitting its name.

The everyday comparison: imagine a form where each answer goes on its own line, and you are only supposed to write a number. If you write the number, press Enter, and then write "and also set a cookie", the person reading the form may treat the second line as a separate instruction. The CRLF is the Enter key, and set-cookie:a is the extra instruction.

Condition two: enough padding to overflow the headers

The second condition is that the reflected value has to be long enough to push the total header field length past the overflow threshold, roughly 7000 bytes. A byte is a unit of size, and one character of ordinary text is usually one byte, so 7000 bytes is roughly 7000 characters of header text.

That effort is what the long run of + characters in the URL is for. Each + is one more character in the value, and because the value is copied into a header, each + makes the header block one byte larger. Repeat it enough times and the header block crosses the threshold. The + characters themselves do nothing interesting; they are padding, chosen because they are harmless and easy to repeat. Any other harmless character would serve the same purpose.

The everyday comparison from earlier fits here too: think of a clerk with a form that has room for a fixed number of lines. The padding is how you write past the bottom of the form.

What happens when the threshold is crossed

Now put the two conditions together and follow the sequence of events on the server.

  1. The server receives the request and reads the parameters from the URL.
  2. It starts building a response, and a parameter from the request ends up in a response header. The value is enormous, and it contains a CRLF followed by set-cookie:a.
  3. The header block is now larger than the server is willing to send, roughly more than 7000 bytes.
  4. The server does not reject the request and does not truncate the headers. It throws the oversized response away and builds a replacement.
  5. The replacement response still contains the header that was injected.

The crucial point is step four. A server that simply refused to send an oversized response, or that cut the headers down to size, would not be vulnerable in this way. The bug is that the overflow path regenerates the response, and the attacker's header, which was already part of the header block being assembled, is carried into the replacement.

That is why the researcher calls this a header field "overflow" rather than a plain CRLF injection. The CRLF is necessary, but it is not sufficient on its own. Without the padding, the injected header would sit inside an oversized header block that the server might handle differently. With the padding, the server takes the discard-and-regenerate path, and that path is where the injected header survives.

What the report does not say about the root cause

The figure of roughly 7000 bytes is the researcher's own approximation, which is why the report says "roughly" rather than giving an exact number. The reasoning behind that figure is set out in the external write-up linked in the report:

Text
https://blog.innerht.ml/overflow-trilogy/

The report does not reproduce that write-up's contents, so the details of how the threshold was established are not in the report text. What the report does give us is the condition, the consequence and the result, which is enough to understand the mechanism even without the full story.

Why this is not the same bug as #52042

The researcher is explicit that this is not the same bug as the earlier report, #52042, even though both are HTTP response splitting issues. Here the cause is the header field overflow and the discard-and-regenerate behaviour it triggers, not whatever mechanism produced the earlier finding.

So we know the two are different, but we do not know from this report what the older one actually was. That is fine for our purposes: the point is that the researcher has separated the two clearly enough for a reviewer to verify the claim independently.

The root cause in one paragraph

If you had to explain the root cause to a friend in a single paragraph, it would go like this. A request parameter is reflected into a response header without adequate sanitisation. Because the value is copied into a header, an attacker can put a CRLF in it and start a new header of their own. Because the value can be made very long, the attacker can also push the total header block past roughly 7000 bytes, at which point the server throws the response away and builds a new one. The new response still contains the attacker's header, so the injection succeeds. The earlier report #52042 was also response splitting, but its root cause was different, which is why this one is filed separately.

Impact: what an attacker could do

The direct consequence of the bug is arbitrary header injection in the response. "Arbitrary" here means "whatever the attacker chooses": the attacker is not limited to the header the researcher happened to use in the proof of concept. The researcher states that attackers can inject arbitrary headers in the response.

To see why that matters, recall what headers are from the background section. A response is two parts: the headers, which are the receipt stapled to the bag, and the body, which is the food inside it. Headers are not decoration. They tell the browser how to treat the page, what to store, where to redirect, what it is allowed to load, and who may embed it. An attacker who can add headers to a response is therefore not just adding text to a page; they are giving the browser instructions that the server never intended to give.

Why a Set-Cookie header matters

The proof of concept injects a set-cookie header, and the report shows it as set-cookie:a. That is the most sensitive header in this context, and it is worth understanding why.

The everyday comparison from the background section is the cloakroom ticket.

"Origin" is the combination of scheme, host and port that a browser uses to decide which site a page belongs to; cookies are scoped to an origin, so a cookie planted for Twitter's origin is sent on later requests to Twitter. The attacker is choosing the value, and the browser is storing it because it arrived in a header from the site it trusts.

The report shows set-cookie:a as the injected header and does not go further into what a real attacker would put there. The point of the proof of concept is that the header appears at all, not what it contains.

The scope is broad but undefined

The researcher's own framing of scope is broad but hedged. The report says the proof of concept page is not the only affected one, and that any endpoint involves reflection of parameters in headers is vulnerable. That is a statement about the class of endpoints, not a list. The report names no other endpoint and demonstrates only the report_story URL.

So the practical reach of the bug is as wide as the set of endpoints that reflect parameters into headers, and the report leaves that set undefined. For a beginner, the important thing to take away is the shape of the claim: it is not "this one page is broken", it is "every page that copies a parameter into a header is broken in the same way, because the overflow behaviour is shared". The single URL is the evidence; the generalisation is the researcher's assessment of how far the same mechanism reaches.

You have to find every place where a request parameter ends up in a response header, and you have to understand what your server does when the header block grows too large. The report gives you the pattern to search for, not the list of places to search.

The conditions an attacker needs

The conditions are the ones set out in the root cause. Both have to hold at the same time:

  1. The endpoint must reflect a request parameter into a response header. Without reflection into a header, there is nothing for the attacker to control in the header block.
  2. The attacker must be able to make the reflected value long enough to push the header fields past the overflow threshold of roughly 7000 bytes. Without the padding, the discard-and-regenerate path is not reached.

In the proof of concept the URL is padded with a long run of + characters and ends with set-cookie:a. The + characters do the padding, the CRLF ends the header early, and set-cookie:a is the new header that gets started.

Where an endpoint reflects a parameter into a header but caps its length, or where the attacker cannot supply enough padding, the overflow path would not be reached. The report does not discuss such limits. Those are exactly the questions a defender would ask, and the report leaves them open.

What the report does not say about impact

That is not unusual for a researcher's write-up: the score is usually assigned by the company's triage team, not by the person filing the report.

What the report does establish is the primitive: on a vulnerable endpoint, an attacker who controls a reflected header value can cause an arbitrary header, including a cookie, to appear in the response that the server ultimately serves. Everything beyond that, the victim model, the practical gain, the severity, is left for the reader to work out. For a beginner, the honest summary is that the report proves the mechanism works and shows one header being injected, and stops there.

Why the impact is bigger than it first looks

It is tempting to read set-cookie:a and think the impact is small, because the cookie value is just the letter a. That reading misses the point. The proof of concept is a demonstration that the header appears, not a weaponised attack. The value is a placeholder precisely so that nobody mistakes the demonstration for a real exploit.

A header that a browser accepts from a trusted origin can change how the page is treated, what is stored, and what the browser does next. The report does not enumerate those possibilities, and it does not need to: the primitive is the finding, and the primitive is arbitrary header injection on any endpoint that reflects parameters into headers.

That is the impact as the report presents it. The next section looks at what the report says about fixing it, which, as we will see, is nothing at all.

Glossary

  • Arbitrary header injection: The ability of an attacker to add headers of their own choosing to a response, rather than being limited to a particular header or value.
  • Body: The main content of a response, such as the HTML of a page, as opposed to the headers that travel with it.
  • Bug bounty platform: A service, such as HackerOne, where researchers report vulnerabilities to companies and may receive a reward.
  • Byte: A unit of size for computer data; one character of ordinary text is usually one byte.
  • Cookie: A small piece of text that a website asks a browser to store and send back on later visits, commonly used to remember a logged-in session.
  • CRLF: Carriage Return, Line Feed; the pair of invisible characters that marks the end of a line in HTTP, written as %0D%0A in encoded form.
  • CVSS: A standard scoring system for rating the severity of a vulnerability, from low to critical.
  • Duplicate: A report describing a bug that has already been reported, usually closed without counting as a new finding.
  • Endpoint: A specific address on a server that performs one job, such as a page, a search, or a login.
  • Header: A single line of extra information sent with a request or response, written as a name, a colon, and a value.
  • Header overflow: Here, the situation where response headers grow past a size the server will handle, roughly more than 7000 bytes, causing the response to be discarded and a new one served.
  • HTTP 500: A status code meaning "Internal Server Error", sent when something goes wrong on the server's side while handling a request.
  • HTTP response splitting: A vulnerability where an attacker inserts a line break into a response and thereby adds headers, or even a new response, of their own.
  • Origin: The combination of scheme, host and port that a browser uses to decide which site a page belongs to; cookies are scoped to an origin.
  • Parameter: A name-and-value pair in a URL's query string, such as source=reporttweet, used to pass information to the page.
  • Proof of concept (PoC): A concrete demonstration that a vulnerability exists, usually a single request or URL that triggers it.
  • Query string: The part of a URL after the question mark, made of parameters joined by & characters.
  • Reflection: When a server copies a value supplied in the request back out into the response.
  • Request: The message a browser sends to a server asking for a page or other resource.
  • Response: The message a server sends back, made of headers and a body.
  • Root cause: The underlying reason a bug exists, as opposed to the symptom it produces.
  • Session identifier: A value stored in a cookie that lets a server recognise a logged-in user across requests.
  • Set-Cookie: The response header a server uses to ask the browser to store a cookie.
  • Status code: A short number sent with every response saying how the request went, such as 404 for not found or 500 for server error.
  • Triager: The person who reviews incoming bug reports for a company and decides whether they are valid, duplicates, or out of scope.
  • URL: The address typed into a browser's address bar, naming a site, a page, and optionally a query string.
  • User ID / tweet ID: Numbers a site uses internally to refer to a particular account or a particular tweet.

Fix

The report contains no remediation section. Nothing in the text states what the vendor did in response, so there is no fix to describe here.

That is worth explaining for a beginner, because it can look like an omission. A bug bounty report is written for the company that owns the software, and its job is to show that a bug exists and how to reproduce it. The company's own engineers then decide how to repair it, and the report is filed before that work happens. So the absence of a fix section is normal: the researcher is reporting a problem, not prescribing a solution.

What the report does establish is the condition that any fix would have to address. Recall the two parts of the root cause from earlier. First, a request parameter is reflected into a response header without adequate cleaning. In the proof of concept this is reported_tweet_id, whose value ends in a CRLF sequence followed by set-cookie:a. Second, the header block is pushed past roughly 7000 bytes, at which point the server discards the response and serves a new one that still carries the injected header.

It gives no information about the vendor's response, no timeline, and no confirmation that the issue was closed.

The only pointer to further detail is the external write-up linked in the report:

Text
https://blog.innerht.ml/overflow-trilogy/

This is a link to a blog post. The report does not reproduce the post's contents, so it gives no information about remediation beyond the disclosure itself. If you want to know how the threshold was established, or what happened after the report was filed, that link is where the researcher's own account would be, and the report text here does not tell you what it says.

It states the condition, the consequence and the result, and it leaves the repair to the people who own the code.

Variants to test

The report gives one URL and one injected header, but the mechanism it describes is general, and the researcher says so: any endpoint that involves reflection of parameters in headers is vulnerable. That sentence is an invitation to look further. The variants below follow directly from it and from the two conditions in the root cause, a reflected parameter and a header block that can be pushed past the overflow threshold.

Before working through them, a word of caution for anyone new to this. Testing a live site with crafted requests is only appropriate where you have permission: on a bug bounty program's in-scope assets, on your own systems, or on a deliberately vulnerable practice site. Sending these requests to a site you do not own or have permission to test is not research, it is unauthorised access, and it can have legal consequences. The variants here are described so that you understand the shape of the bug, not so that you can point it at any address you like.

Other endpoints that reflect parameters into headers

The first thing to try is the same class of reflection on a different page. Recall what reflection means from the earlier sections: the server takes a value you supplied in the request and copies it back out into the response. Most reflection is harmless and lands in the page body, which is how a search page shows your search term back to you. The interesting case is when the copy lands in the headers instead.

So the question to ask about any page is: does any parameter I send end up in a response header? Headers that commonly carry values from the request include:

  • Location, which tells the browser to go to a different address. Redirectors and login flows use it, and they often take the destination from a parameter.
  • Set-Cookie, which asks the browser to store a cookie. Login, logout and session flows use it.
  • Content-Security-Policy, which tells the browser what the page is allowed to load. Pages that build this policy from configuration sometimes echo values into it.
  • Link, which points at related resources such as the next page in a series.
  • Refresh, which tells the browser to reload or move on after a delay.
  • Any custom header starting with X-, which a site defines for its own purposes.

Where do you look for these?

A positive result is a response whose headers contain the value you supplied in the parameter, unchanged and unsanitised. That alone is the precondition; the overflow step is what turns it into splitting. In other words, finding the reflection does not yet prove the bug. It proves you have condition one from the root cause section, and you still need condition two.

How do you actually see the response headers? Your browser's developer tools will show them. In most browsers you can press F12, or right-click and choose "Inspect", then open the Network tab, reload the page, click on the request, and look at the Response Headers panel. That panel lists every header the server sent, which is exactly the receipt we talked about in the background section. The body of the page is shown separately, and it is the headers you want to read here.

Padding to reach the overflow threshold

Once a reflected parameter is found, pad it until the total header field length passes roughly 7000 bytes, the figure the researcher gives. Recall from the background section that a byte is a unit of size, and one character of ordinary text is usually one byte, so 7000 bytes is roughly 7000 characters of header text. Normal headers are a few hundred bytes at most, so this is a deliberate, large amount of padding.

The proof of concept does this with a long run of + characters in reported_tweet_id, and the same approach applies to any reflected parameter: repeat a harmless character until the header block is large enough, then append the CRLF sequence and the header you want to inject. The + characters themselves do nothing interesting. They are padding, chosen because they are harmless and easy to repeat, and any other harmless character would serve the same purpose. What matters is the total length, not which character you use.

The everyday comparison from earlier fits here: think of a clerk with a form that has room for a fixed number of lines. The padding is how you write past the bottom of the form, and the CRLF plus the header you want is the extra line that ends up on the fresh form.

A positive result is the behaviour described in the Details section: the oversized response is discarded, a new response is served, and the new response carries the injected header. Because the threshold is approximate, vary the padding length around it rather than assuming one exact size works. The researcher says "roughly more than 7000 bytes", which is an approximation, not a precise limit. If 7000 characters does not trigger the behaviour, try a little more, and a little more again.

There is a practical wrinkle worth knowing. A URL has a maximum length that browsers and servers will accept, and a very long query string may be rejected before it ever reaches the vulnerable code. If you are testing on a practice site and your padded URL is refused outright, that refusal is a different behaviour from the overflow, and it is worth distinguishing the two: a rejected request is not the same as a discarded response.

Injecting headers other than set-cookie

The proof of concept injects set-cookie:a. The report's claim is arbitrary header injection, so the natural variant is to substitute a different header after the padding and confirm it appears in the regenerated response.

Why does this matter? Because the claim "arbitrary" is stronger than "one particular header". If only Set-Cookie could be injected, the bug would be narrower, and a fix might be possible by special-casing that one header. If any header can be injected, the bug is a general weakness in how the server handles oversized header blocks, and the fix has to be correspondingly general. Testing a second header is how you check which of those two worlds you are in.

A positive result is the same discard-and-regenerate behaviour with your chosen header present in the replacement response, which confirms the primitive is general rather than specific to cookies. That is fine: the claim is explicit, and the variant is simply the test that would confirm it.

When you choose a header to try, pick one whose presence is easy to see and harmless in effect. A header that changes how the browser treats the page, or that stores something, is a poor choice for a demonstration because it can have side effects you did not intend. The researcher's choice of set-cookie:a, with the value a, is a good model: obviously a placeholder, obviously harmless, and obviously visible if it appears.

Retrying on server errors

The report notes that an HTTP 500 may occur and that the page should be refreshed. Recall from the setup section that an HTTP 500 is a status code meaning "Internal Server Error", the server's way of saying something went wrong on its side while handling the request.

When testing a candidate endpoint, treat a 500 as inconclusive rather than a negative: repeat the request, as the researcher does, before concluding the overflow path is not reachable. This is a small point but an important one for anyone new to testing. It is easy to send a request, see an error, and conclude that the bug is not there. The researcher's note tells you that this particular behaviour can fail on the first attempt and succeed on a retry, so a single error tells you nothing either way.

The everyday comparison: if you knock on a door and nobody answers, you do not conclude the building is empty. You knock again, because the person inside may have been in another room. A 500 is the server being in another room. Refresh the page, which sends the same request again, and see what happens the second time.

It simply warns that it can happen and gives the remedy. Carry that warning into any reproduction steps you write, so that a triager following your report does not read a transient error as a failed proof of concept.

Hunting notes

The previous sections covered the report itself and the variants that follow from it. This section is about the practical side: where a bug like this tends to hide, how you notice it, and how you turn a suspicion into a report that someone else can verify. Everything here follows from one sentence in the report, which is worth repeating because it is the whole hunting strategy in miniature: any endpoint that involves reflection of parameters in headers is vulnerable.

That sentence is a rule, not a list. The researcher never enumerates the affected pages. So the work of a hunter is to find the places where the rule applies, and then to check whether the second condition, the overflow, can be reached there too.

Where to look

The bug class lives wherever a request parameter is copied into a response header. That is a narrower set of places than "everywhere a parameter is used", but it is still large, and it has recognisable shapes. The following categories are the ones that come up again and again.

Redirect and return-URL handling. A redirect is a response that tells the browser "the page you wanted is somewhere else, go there instead". The server says this with the Location header, and the address in that header very often comes from a parameter: a return_url, a next, a redirect_to. Login flows use this so that after you sign in you land back on the page you started from. Because the destination is taken from the request and placed in a header, this is the classic place to look for reflection into headers.

Safety, report and share pages. These pages carry many descriptive parameters, because they have to describe exactly what is being reported or shared: which item, which user, which view, where the user came from. They also often set cookies or policy headers alongside the response, because they are part of a flow that tracks state.

Locale, language and view switches. When you change the language of a site, or switch between a list view and a grid view, the site usually remembers your choice. Sometimes it remembers by putting the choice in a parameter and echoing it back, in the page or in a header. A parameter that selects a variant and is then reflected is worth a look.

Anything whose parameters are described as controlling the response rather than the page body. This is the most general category, and the most useful one to keep in mind. Ask of any parameter: does this change what the page says, or does it change how the response is delivered? Parameters that control caching, content type, redirection, framing or policy are the ones that end up in headers, because headers are where those decisions are expressed.

A word on permission before you go further. The guidance here is about understanding the shape of the bug, not about pointing it at any address you like.

Recon signals

Recon is short for reconnaissance: the stage where you look around and gather information before you try anything. For this bug class, recon is simple and needs nothing more than a browser.

The signal you are looking for is a response header whose value matches something you sent. The method is to send a distinctive marker in each parameter and then inspect the full response header block, not just the body.

A marker is a value you choose that is easy to spot and unlikely to appear by accident. Something like zzq123 works well: it is not a word, it is not a number the site would generate, and if you see it in a header you know it came from you. Put the marker in one parameter at a time, send the request, and read the headers.

How do you read the headers? That panel lists every header the server sent, which is the receipt we talked about in the background section.

If the marker appears in a header, the reflection precondition is met. That is condition one from the root cause section. It does not yet prove the bug, because you still need condition two, the overflow. But it tells you that this endpoint is worth pushing further.

The report gives no other detection method. There is no special tool, no scanner, no signature to look for. The threshold behaviour, roughly 7000 bytes, is only visible once you push the header block past that size, so a marker on its own will not show it. You have to do the padding step to see whether the discard-and-regenerate behaviour is there.

One practical note on reading headers. Headers are sent one per line, and the end of the headers is marked by a blank line. When you look at the Response Headers panel, you are seeing that block. If your marker appears in a header value, look closely at where it sits: is it inside a value the server meant to send, or has it started a line of its own? The second case is the one that matters, because it means your value has crossed from being data into being structure.

Demonstrating impact

Finding the behaviour is half the job. The other half is showing it clearly enough that someone else can reproduce it, which is what a report is for.

The shape is this: a concrete endpoint, a parameter that reaches a header, padding that crosses the threshold, and an injected header visible in the regenerated response. Each of those four pieces is necessary, and a report that leaves one out is harder to verify.

A concrete endpoint. Not "the report page" but the full URL, with every parameter filled in. The researcher gives one URL and nothing else, and that is enough because the URL contains everything needed to send the request again.

A parameter that reaches a header. Naming the parameter matters, because it tells the reader where to look in the code and which value to vary if they want to test further.

Padding that crosses the threshold. The long run of + characters is not decoration. It is the part of the request that triggers the overflow, and without it the demonstration would not work. A report that showed the CRLF but not the padding would describe a different, and probably non-working, attack.

An injected header visible in the regenerated response. The researcher's injected header is set-cookie:a. The value a is a placeholder, chosen to be obviously harmless so that the demonstration is easy to read. The point is that the header appears at all, not what it contains.

There is a fifth element in this report that is easy to miss, and it is the one that keeps the report from being closed as a duplicate: the separation from the earlier report, #52042. So if you are reporting something that resembles an earlier finding, say plainly what is different about the mechanism, and be specific. "Similar symptom, different root cause" is the claim; the reviewer's job is to check it.

Finally, carry the retry note into your reproduction steps. The report says:

(If HTTP 500 occurs please refresh)

An HTTP 500 is a status code meaning "Internal Server Error", the server's way of saying something went wrong on its side while handling the request. The researcher is warning that the first attempt can fail with this error and that refreshing the page, which sends the same request again, is the remedy. If you write reproduction steps, include that note, so that a triager following your report does not read a transient error as a failed proof of concept. A single error tells you nothing either way: it is inconclusive, not negative.

Putting it together

If you wanted to go looking for this bug class yourself, the routine would be short. Pick a page that takes parameters and is part of a flow: a redirect, a report, a share, a language switch. Put a distinctive marker in one parameter at a time and read the full response headers in your browser's developer tools. If the marker shows up in a header, you have found a reflection into headers, and the endpoint is a candidate. Then pad that parameter with a harmless repeated character until the header block passes roughly 7000 bytes, append a CRLF and a header of your choosing, and see whether the server discards the response and serves a new one with your header in it. If it does, you have the bug, and the report writes itself: the URL, the parameter, the padding, the injected header, and a note about the 500.

That is the whole method the report implies. It needs no tools beyond a browser, which is fitting, because the report itself needs nothing beyond a browser to follow.

Glossary

  • Developer tools: The panel built into most browsers, usually opened with F12, that shows requests, responses and their headers.
  • Location: The response header that tells the browser to go to a different address, used by redirects.
  • Marker: A distinctive value, such as zzq123, sent in a parameter so that it is easy to spot if it appears in the response.
  • Recon: Short for reconnaissance; the stage of gathering information about a target before trying anything.

Glossary

More by File Descriptor

View all

20 more disclosed reports, best first.

More from X / xAI

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Request smuggling and header injection

The lesson behind this report.

A front end and a back end split one connection's bytes into requests differently, letting an attacker hide a request inside another user's.