[ecommerce.shopify.com] Invalidated redirection
The return_to parameter on the Shopify ecommerce authentication endpoint accepted a value with multiple forward slashes, bypassing redirection protection. An attacker could redirect a victim to an external website after the victim clicked either the link or reject button.
Originally disclosed on HackerOne
- Triaged in 28 hours
- Fixed in 10 days
- Paid in 29 days
- Disclosed after 54 days
Summary by the researcher
Bypassed redirection protection using 5 forward slashes!
The report
Hello,
Suppose, victim has not linked his shop with ecommerce.shopify.com portal then an attacker can redirect him on an external website after linking or rejecting.
Steps to reproduce :
- Get logged in as admin in your shop and ecommerce.shopify.com
- Open this link : https://ecommerce.shopify.com/auth/shopify?shop=[your-shop].myshopify.com&return_to=/////example.com
- If you are logged in then Link These Accounts button and No thanks link will be shown.
- Click on Link Account button or No thanks link.
- You will be redirected on https://example.com instead of ecommerce.shopify.com
- Done
Again, your shop should not be linked to ecommerce.shopify.com.
Suggested Fix : Use more stronger regular expression at this endpoint
Best regards, Shailesh
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 redirection validation used a regular expression that did not correctly handle multiple leading forward slashes, allowing an external URL to pass as a relative path.
Impact
An attacker could redirect a victim to an external website after the victim clicks either the link or reject button, which could be used for phishing.
What the attacker needed
Victim is logged in as admin; shop not linked to ecommerce.shopify.com; victim clicks a crafted link
How it was found
- Log in as admin to your shop and ecommerce.shopify.com.
- Open the crafted link with the return_to parameter containing multiple slashes.
- If logged in, the page shows 'Link These Accounts' and 'No thanks' options.
- Click either the link button or the 'No thanks' link.
- You are redirected to the external site instead of ecommerce.shopify.com.
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 redirect is a web feature that sends you to another page after an action. Here, the site was supposed to only redirect to its own pages, but a crafted link with extra slashes tricked it into sending users to an outside site. This matters because attackers can use such redirects to make phishing links look trustworthy.
What is Open redirect?
A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.