login to any user's cashier account and full account information disclosure
The cashier login page accepted a user-supplied account identifier (PIN) without verifying it belonged to the logged-in user, so an attacker could change the PIN in the cashier iframe to a victim's account ID and access their cashier account, view personal details, and potentially withdraw funds.
Originally disclosed on HackerOne
- Triaged in 17 hours
- Fixed in 25 hours
- Paid in 25 hours
- Disclosed after 8 days
Summary by the researcher
This bug allowed an attacker to login to any user's cachier account , view the user full account details and withdraw money from the user's account to the attacker's credit card , skrill ..etc. http://zombiehelp54.blogspot.com/2015/11/binarycom-critical-vulnerability-to.html
The report
Hi , I have found an issue allowing an attacker to login to any user's cashier account and view sensitive user information by just knowing the user account ID. #Steps to reproduce:
-
open 2 browsers and create 2 accounts , login with each account on a browser.
-
let's call account 1 , the victim and account 2 is the attacker.
-
from the victim account , make sure you are using real account and then go to https://www.binary.com/cashier then click Deposit then click Continue.
-
From the attacker account go to https://www.binary.com/cashier then click Deposit then click Continue.
-
Now you'll see your cashier account , inspect the page elements using your browser inspector then find the
<iframe>tag with the id attribute cashiercont. it will look like this :
<iframe src="https://cashier.binary.com/login.asp?Sportsbook=Binary (CR) SA USD&PIN=CR342435&Lang=en&Password=0e552ae717a1d08cb147f132a31676559e3273ef&Secret=1328d47abeda2b672b6424093c4dbc76&Action=DEPOSIT" frameborder="0" width="100%" height="2000" id="cashiercont" scrolling="auto" style="padding:0px;margin:0px;"></iframe>
- Edit the
<iframe>element and Change thePINparameter value to the victim account id value so it should be like this after the edit:
<iframe src="https://cashier.binary.com/login.asp?Sportsbook=Binary (CR) SA USD&PIN=<VICTIM_ACCOUNT_ID>&Lang=en&Password=0e552ae717a1d08cb147f132a31676559e3273ef&Secret=1328d47abeda2b672b6424093c4dbc76&Action=DEPOSIT" frameborder="0" width="100%" height="2000" id="cashiercont" scrolling="auto" style="padding:0px;margin:0px;"></iframe>
- Now you have successfully logged in the victim's cashier account , to view the victim account details , click the cashier button then next to the customer name click the view link and you'll see all the account details of the victim , including Full name , email and phone number which are the most sensitive here since they can be used in phishing.
Please tell me if you are having any issue reproducing this. Thanks
Context
The target is the cashier of Binary.com (the report predates the Deriv.com name). The cashier is a separate application served from cashier.binary.com and embedded in the main site at https://www.binary.com/cashier inside an <iframe> with the id cashiercont. The main site builds that iframe's src for the logged-in user, and the cashier uses the parameters in that URL to decide whose account it is showing. The feature normally lets a logged-in client deposit, view their own account details and withdraw to their own payment methods.
Setup
No special tooling is needed beyond two browsers and a browser element inspector.
- Two browsers, each with its own session.
- Two accounts: account 1 is the victim, account 2 is the attacker.
- The victim account must be a real account, not a demo one.
Finding it
The researcher noticed that the cashier iframe URL carries the account identifier in a PIN parameter, alongside a Password and a Secret. The account being viewed is selected by a value the client can edit, and swapping it logged the attacker into the victim's cashier. Knowing only a user's account ID was enough to be logged into that user's cashier.
Exploitation
Step 1: prepare two sessions
Open two browsers and create two accounts, logging in to one account in each browser. Account 1 is the victim, account 2 is the attacker.
Step 2: put the victim on a real account
From the victim account, make sure you are using a real account, then go to https://www.binary.com/cashier, click Deposit and click Continue.
Step 3: do the same as the attacker
From the attacker account, go to https://www.binary.com/cashier, click Deposit and click Continue. The attacker now sees their own cashier account.
Step 4: read the iframe URL
Inspect the page elements with the browser inspector and find the <iframe> tag whose id attribute is cashiercont. It looks like this:
<iframe src="https://cashier.binary.com/login.asp?Sportsbook=Binary (CR) SA USD&PIN=CR342435&Lang=en&[redacted]&[redacted]&Action=DEPOSIT" frameborder="0" width="100%" height="2000" id="cashiercont" scrolling="auto" style="padding:0px;margin:0px;"></iframe>
The PIN parameter holds the account ID of the logged-in user (CR342435 in the example). The Password and Secret parameters are also present in the URL, and Action=DEPOSIT selects the cashier action.
Step 5: swap the account ID
Edit the <iframe> element and change the PIN parameter value to the victim's account ID. After the edit it should look like this:
<iframe src="https://cashier.binary.com/login.asp?Sportsbook=Binary (CR) SA USD&PIN=<VICTIM_ACCOUNT_ID>&Lang=en&[redacted]&[redacted]&Action=DEPOSIT" frameborder="0" width="100%" height="2000" id="cashiercont" scrolling="auto" style="padding:0px;margin:0px;"></iframe>
Only the PIN value changes. The attacker's own Password and Secret values stay in place, and the attacker is logged in to the victim's cashier.
Step 6: read the victim's details
The attacker is now logged in to the victim's cashier account. To view the victim's account details, click the cashier button, then next to the customer name click the view link. All of the victim's account details are shown, including Full name, email and phone number. The researcher singles these three out as the most sensitive, because they can be used in phishing.
Root cause
The cashier identifies the account from the PIN parameter in the iframe URL, which the client fully controls, and does not bind that identifier to the authenticated session. The Password and Secret values that accompany it do not prevent the swap: the attacker's own values were left untouched and the cashier still logged in as the victim. The report does not explain how the cashier validates the request.
Impact
An attacker who knows a user's account ID can log in to that user's cashier account, view the full account details, and withdraw money from the user's account to the attacker's own credit card, Skrill or similar. The researcher states that knowing the user's account ID was enough. The details exposed include full name, email and phone number, which the researcher notes can be used for phishing.
Fix
The report does not describe a fix or a change made after disclosure. What should be done is to stop trusting the client-supplied PIN for identity: bind the cashier session to the authenticated user on the server side, and reject any request whose account identifier does not match that session.
Variants to test
- Swap the account identifier in any embedded payment or cashier iframe and see whether the embedded application renders another user's data. A positive result is the victim's account details appearing in the attacker's browser.
- Change only the identifier while keeping the attacker's own tokens and secrets in the URL. A positive result is that the request is still accepted, showing the tokens are not bound to the identifier.
- Try other account identifiers to see whether account IDs can be enumerated. A positive result is a valid account being reached from a guessed ID.
- Check whether the same parameter pattern appears on other actions of the cashier, such as withdrawal or account settings. A positive result is the same cross-account access on those actions.
Hunting notes
This kind of bug hides in secondary applications embedded in the main product: cashier, payment and account pages served from a separate host and pulled in through an iframe. During recon, look for iframes whose src carries identifiers, tokens or secrets in the query string, especially parameters named like PIN, id, user or account. A URL that contains both an identifier and a credential is worth testing for whether the identifier can be swapped. The researcher showed impact by going past the login itself: viewing the victim's full name, email and phone number, and noting that funds could be withdrawn to the attacker's own payment methods. That combination of account takeover and money movement is what makes the report convincing.
A note on the report: it links to the researcher's own blog post about the issue, which is not reproduced here.
What happened, in plain words
Binary.com (the site that later became Deriv.com) had a separate section called the cashier. The cashier is the part of the site where you handle money: you deposit funds, look at your account details and withdraw money to your own payment methods. It is not part of the main website. It runs on its own address, cashier.binary.com, and the main site pulls it into the page inside a frame, so it looks like part of the same page.
A frame like that is called an <iframe>. Think of it as a small window cut into a web page, showing a different website inside it. The main site decides what that little window loads by writing a web address into the frame's src attribute. src is short for source: it is the address of the page the frame should display.
The problem was that this address contained the account identifier of the logged-in user, in a parameter called PIN. A parameter is a small piece of information attached to the end of a web address, after a question mark, in the form name=value. The cashier read the PIN from the address and used it to decide whose account to show. But the address sits in the browser, and anything in the browser can be edited by the person using it. So an attacker could change the PIN to someone else's account ID and the cashier would happily log them in as that person.
The researcher showed that knowing only a user's account ID was enough to get into that user's cashier, see their full account details, and move money out of their account to the attacker's own credit card, Skrill or similar. The details exposed included full name, email and phone number, which the researcher points out are exactly what someone needs for phishing.
The target and the feature
What the cashier is
The cashier is a separate application. "Separate application" means it is its own program on its own server, not a page built by the main site. It lives at cashier.binary.com, while the main site is at www.binary.com. The main site embeds the cashier at https://www.binary.com/cashier inside an <iframe> with the id cashiercont.
An id is a name given to an element on a page so that other code, or a person using the browser's inspector, can find that exact element. Here the id is cashiercont, short for cashier container.
What the feature normally does
For a normal, honest user, the cashier lets them deposit money, view their own account details and withdraw to their own payment methods. Nothing about that is unusual. The bug is not in what the feature does, but in how the cashier decides who you are.
How the main site and the cashier talk
The main site builds the frame's src address for the logged-in user. That address carries several parameters, and the cashier uses them to work out whose account it is showing. In other words, the main site hands the cashier a note saying "this is user X", and the cashier believes the note.
Setting up
You do not need any special tools. Two browsers and the element inspector that every browser already has are enough.
- Two browsers, each with its own session. A session is the browser's memory of being logged in. Two separate browsers keep two logins apart, so you can be two different people at the same time. Two tabs in the same browser would share one login and spoil the test.
- Two accounts: account 1 is the victim, account 2 is the attacker. You play both roles yourself.
- The victim account must be a real account, not a demo one. A demo account is a practice account with fake money, so the test uses a real account instead.
Finding it
The researcher noticed that the cashier frame's address carries the account identifier in a PIN parameter, next to a Password and a Secret. The cashier trusts those address parameters to establish the session. That means the account being viewed is chosen by a value the client can edit.
"Client" here means the browser, the program on the user's side. Anything the client sends can be changed by the person holding the client, so a server should never treat a client-supplied value as proof of identity on its own. The cashier did exactly that. Knowing only a user's account ID was enough to be logged into that user's cashier.
Exploitation
Step 1: prepare two sessions
Open two browsers and create two accounts, logging in to one account in each browser. Account 1 is the victim, account 2 is the attacker.
Why: you need to be the attacker while the victim's account exists and is real. Keeping them in separate browsers means neither login interferes with the other.
Step 2: put the victim on a real account
From the victim account, make sure you are using a real account, then go to https://www.binary.com/cashier, click Deposit and click Continue.
Why: these are the steps the researcher followed to reach the cashier frame.
Step 3: do the same as the attacker
From the attacker account, go to https://www.binary.com/cashier, click Deposit and click Continue. The attacker now sees their own cashier account.
Why: you repeat the same clicks so that the attacker's browser also loads a cashier frame. This is the frame you are about to edit.
Step 4: read the iframe URL
Inspect the page elements with the browser inspector and find the <iframe> tag whose id attribute is cashiercont. It looks like this:
<iframe src="https://cashier.binary.com/login.asp?Sportsbook=Binary (CR) SA USD&PIN=CR342435&Lang=en&[redacted]&[redacted]&Action=DEPOSIT" frameborder="0" width="100%" height="2000" id="cashiercont" scrolling="auto" style="padding:0px;margin:0px;"></iframe>
Line by line, in plain words:
<iframe ...>and</iframe>are the opening and closing tags of the frame. Everything between them describes the little window.src="https://cashier.binary.com/login.asp?..."is the address the frame loads. This is the important part. The address points atlogin.aspon the cashier server, and everything after the?is a list of parameters.Sportsbook=Binary (CR) SA USDis one parameter. The report does not explain what it means.PIN=CR342435is the account identifier of the logged-in user.CR342435is the example value in the report. This is the value that decides whose account the cashier shows.Lang=enis another parameter in the address.- `[redacted] is a long hexadecimal string, a value made of the digits 0 to 9 and the letters a to f. It looks like a hash, which is a fingerprint computed from some input. The report does not explain what it is derived from.
- `[redacted] is another long hexadecimal string, a secret value sent along with the request.
Action=DEPOSITis another parameter in the address.frameborder,width,height,scrollingandstyleare presentation settings: border, size, scrolling behaviour and spacing. They have nothing to do with security.id="cashiercont"is the name that lets you find this exact frame in the inspector.
In the address, the parameters are joined with & rather than a plain &. That is because this snippet is HTML, and in HTML the ampersand has to be written as & to be displayed literally. The browser reads it as a normal & separator between parameters.
Step 5: swap the account ID
Edit the <iframe> element and change the PIN parameter value to the victim's account ID. After the edit it should look like this:
<iframe src="https://cashier.binary.com/login.asp?Sportsbook=Binary (CR) SA USD&PIN=<VICTIM_ACCOUNT_ID>&Lang=en&[redacted]&[redacted]&Action=DEPOSIT" frameborder="0" width="100%" height="2000" id="cashiercont" scrolling="auto" style="padding:0px;margin:0px;"></iframe>
What changed: only the value after PIN=. Where the attacker's own ID used to sit, the victim's account ID now sits, written here as the placeholder <VICTIM_ACCOUNT_ID>. Everything else is identical, including the attacker's own Password and Secret values.
Why this matters: the attacker's Password and Secret were left in place and the attacker was still logged in to the victim's cashier, so the PIN from the address decided the identity.
Step 6: read the victim's details
The attacker is now logged in to the victim's cashier account. To view the victim's account details, click the cashier button, then next to the customer name click the view link. All of the victim's account details are shown, including Full name, email and phone number. The researcher singles these three out as the most sensitive, because they can be used in phishing.
Phishing is when an attacker sends a message that pretends to come from a trusted company. Knowing a real customer's name, email and phone number makes such a message far more convincing, because the attacker can address the person correctly and reach them on channels they trust.
Root cause
The cashier identifies the account from the PIN parameter in the frame's address, which the client fully controls, and does not bind that identifier to the authenticated session. "Authenticated session" means the server's own record of who is logged in, kept on the server where the user cannot edit it. Binding the identifier to that record would mean: whatever PIN arrives, check it against the session the server already knows about, and refuse if they disagree.
The Password and Secret values that accompany the PIN do not prevent the swap. The attacker's own values were left untouched and the cashier still logged in as the victim.
A useful comparison: a nightclub doorman who reads the name written on your hand and lets you in as that person, instead of checking your ID against the guest list he keeps behind the desk. The name on your hand is client-supplied. The guest list is the server-side session.
Impact
An attacker who knows a user's account ID can log in to that user's cashier account, view the full account details, and withdraw money from the user's account to the attacker's own credit card, Skrill or similar. Skrill is an online payment service. The researcher states that knowing the user's account ID was enough.
The details exposed include full name, email and phone number, which the researcher notes can be used for phishing. So the bug is not only a privacy leak: it also allows money to be moved out of the victim's account.
Fix
What should be done is to stop trusting the client-supplied PIN for identity: bind the cashier session to the authenticated user on the server side, and reject any request whose account identifier does not match that session.
In everyday terms: the doorman should stop reading the name on your hand and start checking the guest list behind the desk.
Variants to test
These are follow-up checks in the same spirit, useful when you are learning how to look for similar bugs.
- Swap the account identifier in any embedded payment or cashier frame and see whether the embedded application renders another user's data. A positive result is the victim's account details appearing in the attacker's browser.
- Change only the identifier while keeping the attacker's own tokens and secrets in the address. A positive result is that the request is still accepted, showing the tokens are not bound to the identifier.
- Try other account identifiers to see whether account IDs can be enumerated. Enumerating means trying one after another, like guessing house numbers along a street. A positive result is a valid account being reached from a guessed ID.
- Check whether the same parameter pattern appears on other actions of the cashier, such as withdrawal or account settings. A positive result is the same cross-account access on those actions.
Hunting notes
This kind of bug hides in secondary applications embedded in the main product: cashier, payment and account pages served from a separate host and pulled in through an iframe. During recon, meaning the early exploration of a target, look for frames whose src carries identifiers, tokens or secrets in the query string. The query string is the part of an address after the ?. Pay special attention to parameters named like PIN, id, user or account.
An address that contains both an identifier and a credential is worth testing for whether the identifier can be swapped. If the credential does not actually lock the identifier in place, as happened here, the identifier can simply be swapped.
The researcher showed impact by going past the login itself: viewing the victim's full name, email and phone number, and noting that funds could be withdrawn to the attacker's own payment methods. That combination of account takeover and money movement is what makes the report convincing. A report that stops at "I got in" is weaker than one that shows what an attacker could then do.
The report also links to the researcher's own blog post about the issue, which is not reproduced here.
Glossary
- iframe: a small window inside a web page that displays another web page, defined by an
<iframe>tag. - src: the attribute of a tag that holds the address of what should be loaded, short for source.
- id: a name given to an element on a page so it can be found precisely.
- parameter: a
name=valuepair attached to a web address after a?, used to pass information to the server. - query string: the part of a web address after the
?, containing the parameters. - session: the browser's or server's memory of a logged-in user. A server-side session is kept on the server and cannot be edited by the user.
- client: the program on the user's side, normally the browser. Anything the client sends can be changed by the user.
- server: the computer that runs the website and answers the browser's requests.
- cashier: the part of a betting or trading site where deposits, withdrawals and account details are handled.
- account identifier: the value that names a particular user's account, here carried in the
PINparameter. - hash: a fingerprint computed from some input, usually shown as a long string of hexadecimal characters.
- hexadecimal: a way of writing numbers using the digits 0 to 9 and the letters a to f.
- token: a value sent with a request to represent or prove something, such as a session or a permission.
- secret: a value that is meant to be known only to the parties involved and is used to authorise a request.
- authentication: proving who you are.
- authenticated session: the server's own record of which user is logged in, used to check later requests.
- account takeover: gaining control of another person's account.
- improper authentication: a weakness where a system does not correctly verify who a user is.
- phishing: a fake message that pretends to come from a trusted company to trick someone into revealing information or clicking something harmful.
- Skrill: an online payment service.
- enumerate: to try values one after another, such as guessing account IDs in sequence.
- recon: the early exploration of a target to find what it is made of and where weaknesses might be.
- demo account: a practice account with fake money, as opposed to a real account.
- root cause: the underlying reason a bug exists, as opposed to its visible symptom.
- impact: what an attacker can actually do because of a bug.
- variant: a similar version of the same bug in another place or form.