Skip to content
XSS Disclosed report Intermediate

Stored XSS in https://productreviews.shopifyapps.com/proxy/v4/reviews/product

A product review endpoint reflected a product title containing an XSS payload without a Content-Type header when the callback parameter was absent, so the browser rendered it as HTML. An attacker could store script in a product title and get it to execute in a victim's browser via a crafted URL.

Mahmoud Gamal Follow

Originally disclosed on HackerOne

  • Triaged in 46 hours
  • Fixed in 6 days
  • Paid in 21 days
  • Disclosed after 3.1 years

Hi , I have found a stored XSS issue in https://productreviews.shopifyapps.com #Details: Going to https://productreviews.shopifyapps.com/proxy/v4/reviews/product?product_id=8254331011&version=v4&shop=zh5403-attacker.myshopify.com&_=cache&callback=test will show you the details of a product with the id 8254331011 in JSON format. Having the callback parameter in the url will return Content-Type:application/javascript in the response headers, however, if the url does not contain that parameter, the response won't contain Content-Type header in the response so the browser will display the page as text/html. #PoC: I have created a product with an XSS payload in the title and added the id in the url. https://productreviews.shopifyapps.com/proxy/v4/reviews/product?product_id=8254331011&version=v4&shop=zh5403-attacker.myshopify.com&_=cache&callback=test

PS: This was originally found at https://productreviews.shopifycdn.com/proxy/v4/reviews/product?product_id=8254331011&version=v4&shop=zh5403-attacker.myshopify.com&_=xxxxxxxx but I found that it also works for https://productreviews.shopifyapps.com

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

An attacker could execute script in a victim's browser when the victim opens the crafted URL.

What the attacker needed

Attacker can create a product with a crafted title; victim opens the crafted URL

How it was found

  1. Create a product whose title contains an XSS payload.
  2. Request the product review endpoint with that product's id and the attacker's shop, without the callback parameter.
  3. The response lacks a Content-Type header and the browser renders it as HTML, executing the payload.

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 tell the browser what kind of content it is sending using a header called Content-Type. If that header is missing, the browser may guess and treat the response as a normal web page, so any HTML or script inside it runs. Here, a product title containing script was returned without that header, letting the script run in the browser of anyone who opened the 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 by Mahmoud Gamal

View all

32 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.