Skip to content
XSS Disclosed report Intermediate

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

High 7.8 View original
  • 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:

Screen_Shot_2020-05-22_at_11.45.25_PM.png
Screen_Shot_2020-05-22_at_11.45.25_PM.png From the original on HackerOne

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:

  1. Open Chrome or Firefox
  2. 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))/signin and 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

starbucks.com-loginpagexss.gif
starbucks.com-loginpagexss.gif From the original on HackerOne

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

The original report as published on HackerOne, by cdl. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

  1. Open Chrome or Firefox.
  2. Visit the crafted login URL containing the encoded payload in the path.
  3. Move the mouse over the 'Find the Store' button in the upper right-hand corner.
  4. 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.

More by cdl

View all

14 more disclosed reports, best first.

More from Starbucks

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.