Stored XSS in Discounts section
Product names were not properly escaped after a change to discount timelines, allowing a stored XSS payload to execute when a product was referenced in discount code comments. An attacker with a staff account holding discounts permission could run script outside the rich text and theme editors on the admin panel.
- Paid in 5 hours
- Disclosed after 9 days
Summary by the program
We recently deployed changes to our discount timelines and @mosuan identified that product names were no longer being properly escaped. This resulted in a stored XSS vulnerability when a product with an XSS payload was referenced in the comments for a discount code. This was a valid XSS within the scope of our program because it executed outside of the rich text and theme editors on /admin of the store. It was awarded $1000 because exploitation would require access to a staff account with discounts permission.
The report
self-xss
Impact
1.add Products, shop name is '"'><img src=x onerror=alert(domain.domain)>'
2.click Discounts->code, https://mosuan-img-src-x.myshopify.com/admin/discounts/367541518396
3.add comments, Choose the goods just now.
4.alert
Attachments

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 discount comment feature rendered the referenced product name without HTML-escaping it, so markup in the name was interpreted by the browser.
Impact
An attacker with a staff account that has discounts permission could execute script in the store admin, outside the rich text and theme editors.
What the attacker needed
Staff account with discounts permission
How it was found
- Create a product whose shop name contains an image tag with an error handler.
- Open the Discounts section and select a discount code.
- Add a comment and choose the product just created.
- The script runs and an alert appears.
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.
When a shop admin types a product name, the website should treat it as plain text, not as code. Here it did not, so a name containing a script-like instruction ran as code in the browser of anyone who viewed it in a discount comment. The attacker needed a staff login with permission to manage discounts.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.