DOM XSS via Shopify.API.remoteRedirect
A Shopify admin page listened for postMessage events and handled a remote-redirect message without properly checking the sender's origin. An attacker who could get a logged-in administrator to open a crafted page could run JavaScript in the admin context and act as that administrator.
- Triaged in 3 days
- Fixed in 26 days
- Paid in 3 days
- Disclosed after 26 days
hi, team, after I read the report #422043, I found another monitor postmessage, and did not correctly verify the origin, leading to dom xss, using the store theme can write js this feature, we can modify a theme for the following Payload,
<script>
function attack(){
var ctx=window.open('https://cuxuri.myshopify.com/admin/themes');
var interval;
interval=setInterval(function(){
if(window.attackSuccess){
clearInterval(interval);
}else{
ctx.postMessage(`{"message":"Shopify.API.remoteRedirect","data":{"location":"javascript:alert(document.domain)"}}`);
}
},500);;
}
</script>
<a href="javascript:attack()" style="display:block;text-align:center;width:100%;height:300px;line-height:300px;background:#000;color:#fff;">click me start attack</a>
then log in to the store, access the page containing the payload, you can trigger xss, such as:

Problem code:
https://cdn.shopifycloud.com/web/assets/latest/embeddedApp-ab64a8a13eb3f06403cb2acf67e20576a144bf2d3625807923872e8adf469a14.js
case de.RemoteRedirect:
this.handleRemoteRedirect(t.location);
break;
Impact
Attack other administrators
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 embedded app's message handler processed a remote-redirect message and passed its location value into a navigation sink without validating the message origin or restricting the URL scheme.
Impact
An attacker could run script in a logged-in administrator's session and act on their behalf, though the exploit depends on the victim visiting the attacker's page while logged in.
What the attacker needed
Victim is a logged-in store admin; victim visits attacker-controlled page; attacker can host a page or theme content
How it was found
- Create or modify a store theme page that contains a script which opens the admin themes page in a new window
- Have the script repeatedly send a remote-redirect message to that window
- Log in to the store and visit the page containing the payload
- The admin window processes the message and the script runs
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.
Web pages can send messages to other open windows using a browser feature called postMessage. The receiving page is supposed to check who sent the message, but here it did not check properly, so a malicious page could send a message that made the admin page run attacker-supplied JavaScript. That script then runs with the administrator's privileges.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.