unauthorized access to all collections name
The tax override feature in Shopify admin did not verify that the collection ID belonged to the same shop, allowing an attacker to add a tax override for any collection, including hidden ones, from another shop. This exposed the collection name of the other shop.
Originally disclosed on HackerOne
- Triaged in 18 hours
- Fixed in 6 days
- Paid in 6 days
- Disclosed after 6 days
Hi
admins can set tax rates in shopify admin panel https://SHOP.myshopify.com/admin/settings/taxes/* or ... they can add "Tax override" for specific collection, but this action didn't check ShopID! so we can add any collection id, and it will be add to our shop
this also will works for "Hidden" collections on any shop!
steps:
- goto https://SHOP.myshopify.com/admin/settings/taxes/*
- click on "Add a tax override"
- click on "Select a collection" and select on of your collection
- open "Inspect Element" and find element with name "tax_override[collection_id]"
- change it to a collection_id from another shop like "137861635" and click on save
done! tax rate will be add to shop, and you can find collection name right in "Tax overrides" table!
Another way is send this request directly:
URL: /admin/settings/taxes/*/override
data:
authenticity_token= TOKEN tax_override[is_shipping]=false tax_override[collection_id]= collection_id tax_override[tax_override_regions_attributes][0][zone]=state::TX tax_override[tax_override_regions_attributes][0][rate]=50
Context
Shopify lets merchants configure tax handling from the admin panel, under the settings area for taxes. Within that area an admin can create a tax override that applies a specific rate to a specific collection of products. The override is tied to a collection by its collection ID, and the admin UI offers a picker to choose which collection the override belongs to.
The report describes a privilege escalation: the server accepted a collection ID belonging to a different shop when creating a tax override, so a merchant could attach an override to a collection they do not own.
Setup
The researcher worked with the Shopify admin panel of a shop, at the taxes settings path:
https://SHOP.myshopify.com/admin/settings/taxes/*
No special tooling is described beyond the browser and its element inspector. The precondition is an authenticated admin session on a shop, which is enough to reach the tax override feature. The report does not state any particular plan, version or additional role requirement.
Finding it
The researcher noticed that the action which adds a tax override for a specific collection did not check the ShopID. Because the collection ID is submitted by the client, an admin could supply any collection ID, including one that belongs to another shop, and the override would be added to their own shop.
The same behaviour was reported to work for collections marked as hidden on any shop. The report does not explain how the researcher first spotted the missing check.
Exploitation
Step 1: Open the tax settings
Navigate to the taxes settings page of the shop:
https://SHOP.myshopify.com/admin/settings/taxes/*
Step 2: Start a tax override
Click "Add a tax override".
Step 3: Pick a collection
Click "Select a collection" and select one of your own collections. This populates the form with a legitimate collection ID.
Step 4: Tamper with the collection ID
Open "Inspect Element" and find the element named tax_override[collection_id]. Change its value to a collection ID from another shop, for example:
137861635
Step 5: Save
Click save. The tax rate is added to the shop, and the name of the foreign collection appears in the "Tax overrides" table. That table is where the researcher confirmed the result: the override was accepted and the collection name was resolved and displayed.
Alternative: send the request directly
The same action can be performed without the UI by posting to the override endpoint:
URL: /admin/settings/taxes/*/override
with the following data:
authenticity_token= __TOKEN__
tax_override[is_shipping]=false
tax_override[collection_id]= collection_id
tax_override[tax_override_regions_attributes][0][zone]=state::TX
tax_override[tax_override_regions_attributes][0][rate]=50
The parameters do the following:
authenticity_tokencarries the CSRF token for the admin session.tax_override[is_shipping]is set tofalse, so the override is not a shipping tax override.tax_override[collection_id]is the collection the override is attached to. This is the value that is not validated against the shop.tax_override[tax_override_regions_attributes][0][zone]sets the region for the override, herestate::TX.tax_override[tax_override_regions_attributes][0][rate]sets the rate, here50.
The report does not include the server response body for this request; the observable result is the override appearing in the shop with the foreign collection's name shown.
Root cause
The tax override creation endpoint trusted the client-supplied collection_id and did not verify that the collection belonged to the shop making the request. The ShopID check that should have scoped the lookup was missing, so any collection ID was accepted.
Impact
An authenticated admin of any shop could create a tax override that references a collection belonging to another shop, including collections that are hidden. The foreign collection's name appears in the "Tax overrides" table of the attacker's shop.
Fix
The check that should exist is to verify that the submitted collection_id belongs to the shop making the request before creating the override, and to reject IDs that do not.
Variants to test
- Submit a collection ID from another shop in any admin form that references a collection by ID, such as discount or product grouping features. A positive result is the foreign collection being accepted and its name resolved in your shop.
- Try IDs of hidden or otherwise non-public collections. A positive result is the same acceptance and name disclosure for a collection that is not normally visible.
- Send the request directly rather than through the UI, bypassing any client-side picker restrictions. A positive result is the override being created with the tampered ID.
Hunting notes
This kind of bug tends to hide in admin features where one object references another by an ID supplied from the client, especially where a picker in the UI normally constrains the choice. The signal during recon is a form field or request parameter carrying an object ID, such as tax_override[collection_id], that the server may resolve without scoping it to the current shop. The researcher showed the foreign collection's name appearing in the "Tax overrides" table.
Difficulty
{"difficulty": "beginner", "difficulty_reason": "The bug is found by tampering with a single client-supplied ID in an admin form and observing the result, with no complex tooling or chaining required."}
What happened, in plain words
Shopify is a platform that lets people run online shops. Each shop has an admin panel, a private website where the shop owner manages products, prices, taxes and so on. One of those settings pages lets an admin set up tax rules. Inside it, an admin can create something called a tax override: a rule that applies a particular tax rate to a particular collection of products. A collection is simply a group of products, for example "Summer sale" or "Books".
The tax override has to know which collection it applies to, so the form asks you to pick one from a list. Behind the scenes, each collection has a number called a collection ID, and the form sends that number to Shopify's server when you save.
The researcher found that the server did not check whether the collection ID you sent actually belonged to your own shop. You could take the ID of a collection from a completely different shop, put it into the form, and the server would accept it. The override was then created in your shop, and the name of that other shop's collection appeared in your own "Tax overrides" table. This even worked for collections that were marked as hidden on the other shop.
This is a privilege escalation: an admin of one shop can attach a tax override to a collection from another shop.
Context
Shopify lets merchants configure tax handling from the admin panel, under the settings area for taxes. Within that area an admin can create a tax override that applies a specific rate to a specific collection of products. The override is tied to a collection by its collection ID, and the admin UI offers a picker to choose which collection the override belongs to.
The report describes a privilege escalation: the server accepted a collection ID belonging to a different shop when creating a tax override, so a merchant could attach an override to a collection they do not own.
A few words used above, from zero:
- Admin panel: the private management website of a shop, where the owner changes settings. You need to be logged in to see it.
- Tax override: a custom tax rule that replaces the default rate for a chosen group of products.
- Collection: a named group of products in a shop, such as "Winter coats".
- Collection ID: the internal number that identifies one specific collection. Computers use numbers like this instead of names, because names can repeat and change.
- Privilege escalation: a bug where someone with limited rights can do something that should require more rights, or reach another account's data. A simple comparison: a hotel key card that opens your own room should not open the room next door, even if the door numbers look similar.
Setup
The researcher worked with the Shopify admin panel of a shop, at the taxes settings path:
https://SHOP.myshopify.com/admin/settings/taxes/*
This is a web address (a URL). Reading it from left to right: https:// means the page is loaded over an encrypted connection; SHOP.myshopify.com is the address of one particular shop, where SHOP stands for the shop's own name; /admin/settings/taxes/* is the path to the tax settings page inside the admin panel. The * at the end stands for whatever comes after that part of the path.
No special tooling is described beyond the browser and its element inspector. The precondition is an authenticated admin session on a shop, which is enough to reach the tax override feature. "Authenticated" means you are logged in; a "session" is the period during which the site remembers who you are. The report does not state any particular plan, version or additional role requirement.
Finding it
The researcher noticed that the action which adds a tax override for a specific collection did not check the ShopID. Because the collection ID is submitted by the client, an admin could supply any collection ID, including one that belongs to another shop, and the override would be added to their own shop.
Two ideas to unpack here:
- ShopID: the internal identifier of a shop. A correct server check would ask: does this collection ID belong to the shop that is making the request? If the answer is no, the request should be refused.
- Client: your browser, the program on your own computer. Anything the browser sends can be changed by the person using it, so a server must never trust those values blindly. A comparison: a form on paper that you fill in yourself can always be altered before you hand it over, so the clerk at the desk has to verify what is written on it.
The same behaviour was reported to work for collections marked as hidden on any shop. A hidden collection is one that is not shown publicly in the shop, for example one still being prepared. The report does not explain how the researcher first spotted the missing check.
Exploitation
Step 1: Open the tax settings
Navigate to the taxes settings page of the shop:
https://SHOP.myshopify.com/admin/settings/taxes/*
This is the same address as in the setup. The researcher starts here because the tax override feature lives on this page; you cannot create an override without opening it first.
Step 2: Start a tax override
Click "Add a tax override".
This opens the form for a new override. The button is part of the normal interface, so this step is just ordinary use of the product.
Step 3: Pick a collection
Click "Select a collection" and select one of your own collections. This populates the form with a legitimate collection ID.
Starting with one of your own collections matters: it makes the form fill itself in correctly, so you can see exactly where your own collection ID is stored. You are not trying to use this collection; you are using it as a template to find the field you will later change.
Step 4: Tamper with the collection ID
Open "Inspect Element" and find the element named tax_override[collection_id]. Change its value to a collection ID from another shop, for example:
137861635
"Inspect Element" is a feature built into every modern browser. It shows the hidden structure of the page, the HTML, which is the code the browser used to draw what you see. Form fields appear there with their names and current values, and you can edit those values before the form is sent.
The field name tax_override[collection_id] is the label the browser attaches to the value when it sends the form. The square brackets are a naming convention: they tell the server that this value belongs to a group called tax_override, and within that group its key is collection_id. The number 137861635 is an example of a collection ID from another shop, taken from the report.
Why this step: the picker in the interface only offers your own collections, so it acts as a restriction in the browser. Editing the field directly removes that restriction, and the question becomes whether the server also checks the value. That is the actual test.
Step 5: Save
Click save. The tax rate is added to the shop, and the name of the foreign collection appears in the "Tax overrides" table. That table is where the researcher confirmed the result: the override was accepted and the collection name was resolved and displayed.
"Resolved" means the server looked up the collection by the ID it was given and found a matching record, then used its name. Seeing the foreign name in your own table is the proof: the server did not reject the ID, and it did not limit the lookup to your shop.
Alternative: send the request directly
The same action can be performed without the UI by posting to the override endpoint:
URL: /admin/settings/taxes/*/override
An endpoint is a specific address on a server that accepts a particular kind of request. This one is the address that handles creating an override. The path starts with /admin/settings/taxes/, then * stands for the part that varies, then /override names the action. "Posting" means sending data to the server, as opposed to simply asking for a page.
with the following data:
authenticity_token= __TOKEN__
tax_override[is_shipping]=false
tax_override[collection_id]= collection_id
tax_override[tax_override_regions_attributes][0][zone]=state::TX
tax_override[tax_override_regions_attributes][0][rate]=50
This is form data: a list of name and value pairs, the same kind of content a browser sends when you submit a form. Line by line:
authenticity_token= __TOKEN__is a security token that the site puts into its forms. It proves the request came from a page the site itself served to your logged-in session, and it is a defence against cross-site request forgery, where another website tries to make your browser send a request on your behalf. A comparison: a cloakroom ticket that matches the coat you handed in. The value is a placeholder here; in a real request it is the token from your own session.tax_override[is_shipping]=falsesays this override is not about shipping tax.falsemeans no.tax_override[collection_id]= collection_idis the collection the override is attached to. This is the value that is not validated against the shop, and it is the one the researcher changes.tax_override[tax_override_regions_attributes][0][zone]=state::TXsets the region for the override. The[0]means this is the first region in a list, andstate::TXnames a state, here Texas.tax_override[tax_override_regions_attributes][0][rate]=50sets the rate for that region, here50.
The parameters do the following:
authenticity_tokencarries the CSRF token for the admin session.tax_override[is_shipping]is set tofalse, so the override is not a shipping tax override.tax_override[collection_id]is the collection the override is attached to. This is the value that is not validated against the shop.tax_override[tax_override_regions_attributes][0][zone]sets the region for the override, herestate::TX.tax_override[tax_override_regions_attributes][0][rate]sets the rate, here50.
Sending the request directly is useful because it skips the interface entirely. If the browser form has any restriction, this route shows whether the server itself is protected. The report does not include the server response body for this request; the observable result is the override appearing in the shop with the foreign collection's name shown.
Root cause
The tax override creation endpoint trusted the client-supplied collection_id and did not verify that the collection belonged to the shop making the request. The ShopID check that should have scoped the lookup was missing, so any collection ID was accepted.
"Scoped" here means limited to a boundary, in this case your own shop. A comparison: a library that looks up a book by its number should also check that the book is on its own shelves, not in a different branch.
Impact
An authenticated admin of any shop could create a tax override that references a collection belonging to another shop, including collections that are hidden. The foreign collection's name appears in the "Tax overrides" table of the attacker's shop.
"Disclosed" means information was revealed to someone who should not have seen it. Here the leaked information is the name of a collection, which may itself be sensitive if the collection is hidden.
Fix
The check that should exist is to verify that the submitted collection_id belongs to the shop making the request before creating the override, and to reject IDs that do not.
Variants to test
- Submit a collection ID from another shop in any admin form that references a collection by ID, such as discount or product grouping features. A positive result is the foreign collection being accepted and its name resolved in your shop.
- Try IDs of hidden or otherwise non-public collections. A positive result is the same acceptance and name disclosure for a collection that is not normally visible.
- Send the request directly rather than through the UI, bypassing any client-side picker restrictions. A positive result is the override being created with the tampered ID.
Hunting notes
This kind of bug tends to hide in admin features where one object references another by an ID supplied from the client, especially where a picker in the UI normally constrains the choice. The signal during recon is a form field or request parameter carrying an object ID, such as tax_override[collection_id], that the server may resolve without scoping it to the current shop. The researcher showed the foreign collection's name appearing in the "Tax overrides" table.
"Recon" is short for reconnaissance: the early, quiet stage of looking around a product to understand how it works and where the interesting parts are.
Difficulty
The bug is found by tampering with a single client-supplied ID in an admin form and observing the result, with no complex tooling or chaining required.
Glossary
- Admin panel: the private management website of a shop, used by its owner to change settings.
- Authenticated: logged in, so the site knows who you are.
- Authenticity token: a hidden value placed in forms to prove a request came from the site's own page in your session; a defence against cross-site request forgery.
- Client: the program on your own computer, usually the browser, which sends requests to a server.
- Collection: a named group of products in a shop.
- Collection ID: the internal number identifying one specific collection.
- Cross-site request forgery (CSRF): an attack where another website makes your browser send a request to a site where you are logged in.
- Disclosure: revealing information to someone who should not have seen it.
- Endpoint: a specific address on a server that accepts a particular kind of request.
- Form data: name and value pairs sent to a server when a form is submitted.
- Hidden collection: a collection that is not shown publicly in the shop.
- HTML: the code that describes the structure of a web page.
- Inspect Element: a browser feature that shows and lets you edit the HTML of the page you are viewing.
- Recon: reconnaissance, the early stage of exploring a product to understand how it works.
- Resolve: to look up a record by an identifier and use the result, such as finding a collection by its ID.
- Scope: to limit an action or lookup to a boundary, such as one shop.
- Session: the period during which a site remembers who you are after you log in.
- URL: a web address.