Skip to content
XSS Disclosed report Intermediate

Reflected XSS In Marketing Reports Page On *.myshopify.com/admin

The return_page_pathname query parameter on the admin marketing reports page was placed into a back-link's href without validation, so a javascript: value could run script. An attacker could send a crafted link to a staff member and, if the victim clicked the back button before the page finished loading, run arbitrary JavaScript in the admin context.

raymondlind8 Follow

Originally disclosed on HackerOne

Medium 4.2 View original
  • Disclosed after 2.5 years

Summary by the program

Please note: Storefront XSS is listed as a Known Issue on our policy page and the vast majority of storefront XSS reports received on our program are closed as Not Applicable.

The return_page_pathname querystring parameter on the following URL was vulnerable to XSS by using the javascript: protocol:

https://[YOUR-SHOP].myshopify.com/admin/marketing/reports/[MARKETING-CAMPAIGN-ID]?return_page_pathname=%2Fadmin%2Fmarketing&return_page_title=Marketing%20overview

Attack Complexity was assessed as high, because there are specific conditions for this XSS to successfully execute.

For example:

https://[YOUR-SHOP].myshopify.com/admin/marketing/reports/[MARKETING-CAMPAIGN-ID]?return_page_pathname=javascript:alert('xss')&return_page_title=Marketing%20overview

To be impacted, an authenticated staff member would need to:

  1. Visit a link with an XSS payload in the link
  2. Click the back button before the page is fully loaded.

Summary by the researcher

There is a reflected XSS vulnerability in the Shopify marketing reports view page, which would allow an unauthenticated attacker to execute arbitrary javascript on any Shopify admin store. This is done via a unique URL payload being created by an attacker and sent to a Shopify user directing them to the marketing reports page, which will execute the javascript payload upon the user hitting the back button after the page is loaded. This parameter was meant to provide context on where the user should return to after attempting to go back, but could be manipulated to execute javascript via the returned response containing the attacker payload in the anchor's href value.

When the victim hits this back button on the marketing report page after loading, instead of returning them to their marketing page as it should, it will execute the XSS payload inserted by the unauthenticated attacker, making this vulnerability able to affect all Shopify stores and users who receive the link.

This page contained lots of valuable information for the specific user and could have been used to gather sensitive user data, execute actions as the victim, and much more.

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

If the timing condition was met, script could run in the admin context, potentially exposing sensitive data or performing actions as the victim; the report notes the attack complexity was assessed as high.

What the attacker needed

Victim is a logged-in staff member; victim opens the crafted link; victim clicks back before page loads

How it was found

  1. An attacker builds a marketing reports URL with a javascript: value in the return_page_pathname parameter.
  2. The attacker sends the link to an authenticated staff member.
  3. The staff member visits the link.
  4. The staff member clicks the back button before the page is fully loaded, which runs 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 report has not been written yet. The Original tab links to the source.

A web page can include a link whose destination is a small piece of JavaScript instead of a normal web address. If the site puts a value from the URL into that link without checking it, clicking the link runs the attacker's code inside the logged-in admin area. Here the value came from a query parameter and ended up in a back button's link.

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.