Skip to content
XSS Disclosed report Beginner

H1514 Stored XSS in Return Magic App portal content

The Return Magic app allowed users to save unsanitised HTML in the portal content settings, so an attacker could inject a script that executed in other users' sessions when they viewed the portal settings page or the public portal search page.

Mahmoud Gamal Follow

Originally disclosed on HackerOne

  • Triaged in 6 days
  • Fixed in 13 months
  • Paid in 6 days
  • Disclosed after 13 months

Summary by the program

Note: This report was submitted during our H1-514 live hacking event, which had an expanded scope compared to our public bug bounty program. The app mentioned in this report is not currently in scope for our public program.

The report

Summary: Stored XSS vulnerability was found in return magic app portal content which executes in the application domain in https://services.alveo.io/dashboard-shopify/settings/portal/content

Description: It's been found that Return Magic app allows users to add HTML content to their return portal without sanitizing the HTML which makes it possible to inject malicious tags that can be used to execute arbitrary JavaScript through other users' sessions.

Steps To Reproduce:

  1. Install Return Magic app
  2. Navigate to https://<shop>.myshopify.com/admin/apps/returnmagic
  3. Open Settings tab from the top menu and then open Portal --> Content from the left menu
  4. For the textarea where you enter your portal content, click the Code icon and enter Test <img src=x onerror=alert(2)> then click Save
  5. Now each time a user opens the portal settings page, alert(2) will be executed.
  6. XSS also triggers in https://services.alveo.io/portal/search?shop=<shop>.myshopify.com
Screen_Shot_2018-10-08_at_1.36.21_AM.jpg
Screen_Shot_2018-10-08_at_1.36.21_AM.jpg From the original on HackerOne

Impact

Through this vulnerability a malicious user will be able to execute JavaScript through other user's sessions' which allows him to do malicious actions such as stealing sensitive information, submitting requests that bypass csrf protection ..etc

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

Root cause

The application stored user-supplied HTML in the portal content setting and rendered it without sanitisation, allowing script execution.

Impact

A malicious user could execute JavaScript in other users' sessions, potentially stealing sensitive information or submitting requests that bypass CSRF protection.

What the attacker needed

A Shopify store with the Return Magic app installed; ability to edit portal content settings; victim views the portal settings or search page

The fix

The report does not state a fix; it notes the HTML was not sanitised.

How it was found

  1. Install the Return Magic app on a Shopify store.
  2. Open the app's admin page and go to Settings, then Portal, then Content.
  3. In the portal content textarea, switch to code view and enter HTML containing an image tag with an error handler that runs JavaScript.
  4. Save the content.
  5. Open the portal settings page again and observe the JavaScript executing.
  6. Also open the public portal search URL for the shop and observe the JavaScript executing there.

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.

When a website lets you type HTML that is later shown to other people without cleaning it first, you can sneak in a small script. That script runs in the browser of anyone who views the page, as if the website itself had written it. This is called stored cross-site scripting (XSS) because the harmful content is saved on the server and served to victims later.

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.