Skip to content
XSS Disclosed report Intermediate

XSS *.myshopify.com/collections/vendors?q=

The `q` parameter on Shopify storefront vendor collection pages was not escaped when inserted into the Liquid `collection` object, so stores that placed `collection.title` inside an HTML attribute were vulnerable to reflected cross-site scripting. An unauthenticated attacker could use this to attack the admin area of a store, since the storefront and admin share the same origin.

gromoza Follow

Originally disclosed on HackerOne

Medium 6.4 View original
  • Triaged in 3 days
  • Fixed in 10 days
  • Paid in 3 days
  • Disclosed after 29 days

Summary by the program

@gromoza reported a reflected cross-site scripting vulnerability that affected some Shopify storefronts. The vulnerability resulted from improper handling of the q parameter, which was not properly escaped when placed into the collection object in Liquid. As a result, stores that included collection.title in an HTML attribute would be vulnerable to reflected cross-site scripting. A reflected cross-site scripting vulnerability in the storefront could be used by unauthenticated users to attack the admin area of a store, given that the storefront is hosted on the same origin as the admin area of a store.

The report

WAF cut "<",">, but " and ' still in. 1. [PoC example link](https://lostvalues.myshopify.com/collections/vendors?q=X" onmouseover="alert('XSS')" style="font-size: 1001pt;") 2.mouse on X 3. ..

4.XSS alert message

Impact

XSS atack

Attachments

XSS.png
XSS.png From the original on HackerOne

The original report as published on HackerOne, by gromoza. 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 `q` parameter was inserted into the Liquid `collection` object without HTML-attribute escaping, so a quote character could break out of the attribute.

Impact

An unauthenticated attacker could run script in a storefront that shares an origin with the store admin, potentially attacking the admin area; the report notes a WAF blocked angle brackets but not quotes, so the payload relied on quote-based attribute breakout.

What the attacker needed

A Shopify store using collection.title in an attribute; victim opens a crafted link; victim moves mouse over the element

How it was found

  1. Open a storefront vendor collection URL with a crafted `q` value containing a quote and an event handler.
  2. Move the mouse over the injected element.
  3. The browser runs the script and shows an alert.

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.

A web page can build its HTML from pieces of text, and if it drops user-supplied text into a spot like an attribute without cleaning it, the browser may treat that text as code. Here the search term from the URL ended up inside an attribute, so a crafted link could make the browser run script. Because the shop pages and the admin pages sit on the same web address, that script could act on the admin side too.

What is XSS?

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

More from Shopify

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.