XSS - URL Redirects
The admin page for adding URL redirects accepted a javascript: or data: URI as the redirect target, and clicking the resulting link executed script in the shop's domain. An attacker with admin access could run script in the context of the admin panel.
- Disclosed after 30 days
Hi! I found that https://[shop name].myshopify.com/admin/redirects is vulnerable to XSS To Reproduce:
- Click Add Url Redirect
- set page for redirect
- add redirects as:
javascript:alert(document.domain) or data:text/html;base64,PHNjcmlwdD5hbGVydCgiY29va2llIHN0ZWFsOiAiK2RvY3VtZW50LmNvb2tpZSk7d2luZG93LmxvY2F0aW9uLmhyZWY9J2h0dHA6Ly93d3cuZ29vZ2xlLmNvbSc7PC9zY3JpcHQ+ (XSS and URL redirect) 4. A new redirect link created 5. Click on link 6. XSS
Thanks Fr33d0m from vlazeg team
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
Impact
An attacker who can create redirects could run script in the shop admin context, but the report does not show how a non-admin would reach the link.
What the attacker needed
Access to the shop admin redirects page
How it was found
- Open the Add URL Redirect form in the shop admin.
- Choose the page to redirect.
- Enter a javascript: or data: URI as the redirect target.
- Save the new redirect.
- Click the created redirect link.
- Script runs in the shop domain.
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 URL redirect is a feature that sends visitors from one address to another. Here the redirect target was not checked, so a value starting with 'javascript:' or 'data:' was treated as a web address and run as code when clicked. This lets someone who can already edit redirects run their own script inside the shop's admin pages.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.