[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.
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
- create a buy now button
- when you click buy now button , you will be redirected to https://madamcury.myshopify.com/cart/1188733065:1?channel=buy_button&referer=javascript:alert(document.cookie);
- set referer parameter in url to javascript:alert(document.cookie);
- finish the order
- now from admin account login into admin panel,
- click the referer link , you will see a xss triggered.
All admins, users of a shop can be targeted with this attack. Tell me if you any issues reproducing the issue :)
regards Wesecureapp
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
- Create a buy now button for a shop.
- Click the button and note the cart URL containing the referer parameter.
- Change the referer parameter to a javascript: payload.
- Complete the order so the value is stored.
- Log in to the admin panel and click the referer link.
- 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.