Cross-Site Scripting (XSS) on www.starbucks.com | .co.uk login pages
The login page built links from the URL path without proper escaping, allowing an attacker to inject an event handler. An attacker could execute JavaScript in the context of the site and steal user credentials.
cdl Follow with hunt4p1zza
Originally disclosed on HackerOne
- Triaged in 2 days
- Fixed in 7 days
- Paid in 4 days
- Disclosed after 39 days
Summary by the program
cdl and hunt4p1zza discovered a vulnerability within how ASP.Net handles the URI to perform reflected cross site scripting (XSS). @cdl and @hunt4p1zza — thank you for reporting this vulnerability and for confirming the resolution.
The report
Hi team,
Summary: There is a cross-site scripting vulnerability on the login page of www.starbucks.com and various regions, due to improper escaping on the URL path.
Description: The login page at https://www.starbucks.com/account/signin builds several links by the relative URL path. An attacker can actually control the relative path:

Furthermore, the application does not escape certain characters – allowing us to break out of the tags and inject a malicious event handler.
Platform(s) Affected:
Steps To Reproduce:
- Open Chrome or Firefox
- Visit
https://www.starbucks.com/account/(A(%22%20%252fonmouseover=%22alert%25%32%38%64%6f%63%75%6d%65%6e%74.%64%6f%6d%61%69%6e%25%32%39%22))/signinand in the upper right-hand corner, move your mouse over the "Find the Store" button.
The XSS will trigger and you'll get an alert() with the value of document.domain

Exploitation:
Since this is on the login page, it is absolutely trivial to steal user credentials.
Here's a simple proof-of-concept, this will just alert() your password back to you:
https://www.starbucks.com/account/(F(%22%20%252fonmouseover=%22%2561%256c%2565%2572%2574%2528%2564%256f%2563%2575%256d%2565%256e%2574%252e%2567%2565%2574%2545%256c%2565%256d%2565%256e%2574%2573%2542%2579%254e%2561%256d%2565%2528%2527%2541%2563%2563%256f%2575%256e%2574%252e%2550%2561%2573%2573%2557%256f%2572%2564%2527%2529%255b%2530%255d%252e%2576%2561%256c%2575%2565%2529%22))/signin
How can the system be exploited with this bug?
An attacker can easily abuse this bug to steal user passwords, inject malicious javascript into the context of www.starbucks.com, etc.
Suggested Mitigation
Implement HTML encoding / escaping on the path.
Impact
This is a high impact vulnerability as this affects the login page.
Best, @cdl
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
The application built links from the relative URL path without escaping certain characters, allowing an attacker to break out of tags and inject an event handler.
Impact
An attacker could steal user passwords and inject malicious JavaScript into the context of the site, which is high impact because it affects the login page.
What the attacker needed
Victim visits a crafted link; victim moves mouse over a button
The fix
The report suggests implementing HTML encoding or escaping on the path, and the vulnerability was confirmed resolved.
How it was found
- Open Chrome or Firefox.
- Visit the crafted login URL containing the encoded payload in the path.
- Move the mouse over the 'Find the Store' button in the upper right-hand corner.
- The XSS triggers and an alert shows the value of document.domain.
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.
Cross-site scripting (XSS) is when a website puts user-controlled text into a page without making it safe, so an attacker can make the browser run their code. Here, the login page used part of the web address to build links, and certain characters were not escaped, so a crafted link could run a script when the victim moved their mouse over a button. Because it runs on the real login page, the script can read what the user types, including their password.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.