Skip to content
XSS Disclosed report Beginner

[persistent cross-site scripting] customers can target admins

A shop's cart URL accepts a referer parameter that is stored and later shown to the admin in the control panel. An attacker can set that parameter to a javascript: payload so that when the admin clicks the link, script runs in the admin's session.

akhil-reni Follow

Originally disclosed on HackerOne

  • Triaged in 6 days
  • Fixed in 3 months
  • Paid in 7 days
  • Disclosed after 3 months

hello,

Let's say a shop has a checkout button. when we click buy now , you will be redirected to https://madamcury.myshopify.com/cart/1188733065:1?channel=buy_button&referer=javascript:alert(document.cookie);

Keep an eye on referer parameter in URL referer=javascript:alert(document.cookie);

A customer can set referer to a xss payload, and the admin will see a referer parameter in his control panel, if the admin clicks on the link the xss triggered. (POC ATTACHED)

Steps to reproduce

All admins, users of a shop can be targeted with this attack. Tell me if you any issues reproducing the issue :)

regards Wesecureapp

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

Impact

An attacker could run script in a shop admin's session, and the report claims all admins and users of a shop can be targeted, though it does not demonstrate what actions the script could take.

What the attacker needed

A shop with a buy now button; victim is a shop admin; admin clicks the stored referer link

How it was found

  1. Create a buy now button for a shop.
  2. Click the button and note the cart URL containing the referer parameter.
  3. Change the referer parameter to a javascript: payload.
  4. Complete the order so the value is stored.
  5. Log in to the admin panel and click the referer link.
  6. Observe the script running in the admin's browser.

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 takes a value from the address bar and shows it later to another user, such as a shop owner. If that value is treated as a link that can run code instead of plain text, clicking it can run the attacker's code in the shop owner's browser. This is called cross-site scripting.

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 akhil-reni

View all

13 more disclosed reports, best first.

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.