CSRF in function "Set as primary" on accounts page
The 'set as primary' function on the accounts page lacked an anti-CSRF token, so an attacker could make a logged-in victim change their primary account by tricking them into visiting a malicious page. The report demonstrates this by comparing the request to the delete account function, which does include a token.
b76fad49b0533cc7149d9a4 Follow
Originally disclosed on HackerOne
- Triaged in 3 days
- Fixed in 3 days
- Paid in 3 days
- Disclosed after 33 days
I would like to report this CSRF vulnerability in coinbase on function "set as primary" for a account in accounts page.
Steps:
- Login to your coinbase account (which atleast has two accounts)
- Go to "accounts" page and out of the two accounts click "set as primary" link for one of the accounts which is not primary.
- Capturing the request in proxy, you will find that there are no anti CSRF token used for this function.
Issue: Attacker simply send a link of a page to the victim with a iframe running something like this "https://coinbase.com/accounts/535e52d301c95bda2100005b/set_as_primary". When the victim will click the link of coinbase will get executed in the back without victims consent.
NOTE: In the POC video attached, i have tried to show that for the delete account function there is an "authenticity token" sent but for set as primary function there is no token used, which might cause a CSRF on this.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the 'set as primary' endpoint did not require or validate an anti-CSRF token, unlike the delete account function.
Impact
An attacker could change the victim's primary account without their consent by getting them to visit a malicious page, though the report only claims this could happen and does not show a full exploit.
What the attacker needed
Victim is logged in; victim has at least two accounts; victim visits attacker's page
How it was found
- Log in to a Coinbase account that has at least two accounts.
- Go to the accounts page and click 'set as primary' for a non-primary account.
- Capture the request in a proxy and observe that no anti-CSRF token is present.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
CSRF (Cross-Site Request Forgery) is when a malicious website makes a logged-in user's browser send a request to another site without the user knowing. Here, the 'set as primary' action had no secret token to prove the request came from the real site, so an attacker could embed it in a hidden frame and change which account is primary.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.