How I Secured 50+ Brand & Startups in Shopify Stores | XSS | Responsible Disclosure
A search page on Shopify stores using a third-party SaaS search app reflected user input into the page, so a crafted search query could run script in the visitor's browser. The researcher found over 50 brands and startups affected and the app vendor later patched the issue.
Published on prathapilango.medium.com
Hello hamckers! In this blog post, I’ll share my recent finding of a Cross-Site Scripting (XSS) vulnerability affecting Shopify stores.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the third-party search app reflected the search query into the page without properly encoding it, so a Unicode-encoded HTML tag was decoded and executed by the browser.
Impact
An attacker could run script in the browser of anyone who opened a crafted search link on an affected store, though in some cases a WAF blocked the first attempt and the researcher had to retry through the stored search value.
What the attacker needed
Victim opens a crafted search link; store uses the third-party search app; no account needed
The fix
The third-party app vendor patched the vulnerability, according to the text.
How it was found
- Try a simple image tag payload in the search bar and observe it does not fire.
- Switch to a Unicode-encoded version of the payload and put it in the search query parameter.
- Load the crafted search URL and see the script pop-up appear.
- Use a Google dork for the search path to find other stores using the same app.
- Visit the vendor's site to collect partner and customer names, then check each domain manually.
- Where a WAF blocked the first attempt, return to the home page and search again so the stored search value triggers the script.
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 write-up has not been written yet. The Original tab links to the source.
Cross-site scripting (XSS) means a website takes something a user typed, such as a search term, and puts it into the page without cleaning it first. An attacker can then send a link that makes the victim's browser run the attacker's script, which can act as the victim on that site. Here the search box of a third-party search app used by many shops was the weak point.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.