Skip to content
XSS Disclosed report Beginner

Reflected XSS in *.myshopify.com/account/register

The customer registration form reflected the first and last name values without escaping when returning validation errors, so HTML supplied in those fields executed as script. Because the form had no CSRF protection, an attacker could make a victim submit the malicious values and run script in the shop's context.

ishahriyar Follow

Originally disclosed on HackerOne

  • Triaged in 9 hours
  • Fixed in 3 months
  • Paid in 10 hours
  • Disclosed after 3 months

Summary by the program

@ishahriyar noticed the default customer registration form for shops would return an error when the first or last name included HTML but the value would be reflected unescaped in the registration form. Since there is no CSRF protection on the form, this resulted in a reflected XSS vulnerability despite the POST request. We addressed this by sanitizing the values when returned for errors and awarded $1500 since it would have given access to /admin if visited by an authenticated staff user but was partially mitigated by our captcha check.

The report

Shopify allows shop admin to enable customer registration. When a customer registers with a short password and HTML content as the first name and last name then customer redirects to *.myshopify.com/account/register with error messages and the provided data. As there is no Cross-site Scripting validation and CSRF protection anyone can force the customers to execute XSS on that page.

Screencast_12-20-18_15_33_02.webm From the original on HackerOne

Impact

By exploiting this Vulnerability An attacker can force the customer to execute XSS and

  1. Steal user's cookie.
  2. Launch advanced phishing attacks by rendering arbitrary HTML forms.
  3. Force users to download malware/viruses.
  4. Execute browser-based attacks etc.

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

Likely the error-rendering path echoed the submitted first and last name values into the page without HTML-encoding them, and the form lacked CSRF protection so the submission could be triggered by a third party.

Impact

An attacker could run script in a victim's session, potentially reaching /admin if an authenticated staff member visited, though the captcha check partially mitigated this.

What the attacker needed

Customer registration enabled; victim submits or is forced to submit form; captcha may partially mitigate

The fix

The values were sanitised when returned in error messages, and the report states the issue was addressed.

How it was found

  1. Enable customer registration on a shop.
  2. Submit the registration form with a short password and HTML content in the first and last name fields.
  3. Observe the redirect to the account/register page where the error messages repeat the supplied values unescaped.

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 registration form shows an error message and repeats back what you typed. The site failed to clean that text first, so if you typed HTML instead of a name, the browser treated it as real page code and ran it. This is called cross-site scripting: an attacker gets their own code to run inside someone else's session on the site.

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 ishahriyar

View all

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