How I gained access to revenue and traffic data of thousands of Shopify stores
An API endpoint on Shopify's Exchange marketplace exposed private revenue and traffic data for stores that had installed the Exchange app. An attacker could enumerate store names and retrieve monthly revenue figures for thousands of merchants without authentication.
Published on blog.usejournal.com
About one year ago when I was hacking on Shopify program, I had to set a few alerts to get notified whenever a new API endpoint appears on a list of subdomains and URLs (a custom script I put together to keep track of new APIs).
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the Exchange app exposed an API endpoint that returned revenue data for any store name without verifying that the requester was authorised to view that store's private data.
Impact
Private monthly revenue and traffic data for over 8,700 Shopify stores was exposed without authentication, though the data was limited to stores that had installed the Exchange app.
What the attacker needed
Store has Exchange app installed; no authentication required; knowledge of store name
The fix
The issue was fixed by Shopify after triage.
How it was found
- Find store names by reverse IP and later by reverse CNAME records of shops.myshopify.com.
- Build a wordlist of store names from the discovered domains.
- Request the revenue_data.json endpoint for each store name.
- Filter responses to identify stores returning private revenue data.
- Use a slow, single-threaded script to avoid rate limiting and collect data for many stores.
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 write-up has not been written yet. The Original tab links to the source.
The website had a web address that returned sales figures for any store name you put in it. Normally only the store owner should see this private data, but the site did not check who was asking. By trying many store names, the researcher could download private revenue numbers for thousands of shops.
What is IDOR?
One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.