Reflective Cross-site Scripting via Newsletter Form
A reflected cross-site scripting flaw existed in the newsletter signup form on myshopify.com stores, caused by a filter bypass using Ruby-on-Rails mass assignment to inject unfiltered quotes. An attacker could craft a URL that executes JavaScript on page load, potentially compromising administrative sessions or performing actions as the victim.
- Triaged in 17 hours
- Fixed in 4 days
- Paid in 41 hours
- Disclosed after 4 days
Summary by the researcher
This is a reflective cross-site scripting in the newsletter signup feature of *.myshopify.com websites. It involves a filter bypass by using Ruby-on-Rails mass assignment to insert quotes (") which are not user supplied and therefore are not being filtered by the application.
This allows escaping the value attribute on an input tag to add an onfocus attribute which contains javascript and finishing it off with an autofocus to trigger the event on page load.
Extra spaces and square brackets "[]" were causing the payload to fail which made it difficult to retrieve sensitive data from requests to the admin panel. This was circumvented by using "split", "slice", "pop" and "shift" to move around the response data to grab administrative API keys from the /admin/apps endpoint.
The report
*.myshopify.com is vulnerable to a reflective cross-site scripting attack in the newsletter form. This can be crafted to trigger on a page load without any further user interaction.
The following example url shows this vulnerability:
https://testbuguser.myshopify.com/?contact[email]%20onfocus%3djavascript:alert(%27xss%27)%20autofocus%20a=a&form_type[a]aaa
This was tested on a newly registered store "testbuguser.myshopify.com"
If you require any additional details, please do not hesitate to bump.
Impact
This attack could be leveraged to compromise administrative sessions or perform actions on behalf of users with the same level of privilege as the user.
Attachments

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 application relied on filtering user-supplied quotes but Ruby-on-Rails mass assignment allowed injecting quotes that were not filtered, enabling attribute injection in the newsletter form.
Impact
This attack could be leveraged to compromise administrative sessions or perform actions on behalf of users with the same level of privilege as the user.
What the attacker needed
Victim visits a crafted URL; a Shopify store
How it was found
- Register a new store on myshopify.com.
- Craft a URL with a contact[email] parameter containing an injected onfocus attribute and autofocus.
- Visit the crafted URL to trigger the JavaScript on page load.
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.
Cross-site scripting (XSS) is when an attacker sneaks JavaScript into a website so it runs in another person's browser. Here, the newsletter form failed to properly clean up a quote character, letting the attacker break out of an input field and add code that runs automatically when the page loads. This could let an attacker steal data or act as the logged-in user.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.