Unauthenticated access to details of hidden products in any shop via title emuneration
A password-protected Shopify store in 'Opening Soon' mode exposed product details through a JSON endpoint when a specific channel parameter was used. An unauthenticated attacker who knew or guessed a product title could retrieve its full description and price, leaking commercially sensitive information.
- Triaged in 2 days
- Fixed in 12 days
- Paid in 12 days
- Disclosed after 12 days
This issue allows external unauthenticated attacker to bypass password protection of currently unopened ("Opening Soon" stage) stores and obtain full description of products considering they know/enumerate the title of the product and the product has been published. It could be used to obtain commercially sensitive information, such as retail prices of new products, and be used by competitor stores.
Reproduction:
- Browse to the following URL and see that the shop is password-protected http://sdfg674567.myshopify.com/
- Browse to http://sdfg674567.myshopify.com/tee.json?channel=buy_button
and see the description of an item with title 'tee' which otherwise should not be accessible:
{"product":{"id":3019937283,"title":"tee","body_html":"\u003cp\u003eThis is a hidden super secret Tee at an awesome price that will be published next year.\u003c/p\u003e\n\u003cp\u003eYou should not be able to see it via:\u003c/p\u003e\n\u003cp\u003ehttp://sdfg674567.myshopify.com/products/tee\u003c/p\u003e","vendor":"sdfg674567","product_type":"","created_at":"2015-10-08T18:48:58-04:00","handle":"tee","updated_at":"2015-10-11T23:45:36-04:00","published_at":"2015-10-11T23:44:00-04:00","template_suffix":null,"published_scope":"global","tags":"","variants":[{"id":8803442371,"product_id":3019937283,"title":"Default Title","price":"11.00","sku":"","position":1,"grams":0,"inventory_policy":"deny","compare_at_price":null,"fulfillment_service":"manual","inventory_management":null,"option1":"Default Title","option2":null,"option3":null,"created_at":"2015-10-08T18:48:58-04:00","updated_at":"2015-10-08T23:30:52-04:00","requires_shipping":true,"taxable":true,"barcode":"","inventory_quantity":-124,"old_inventory_quantity":-124,"image_id":null,"weight":0.0,"weight_unit":"kg"}],"options":[{"id":3641130243,"product_id":3019937283,"name":"Title","position":1,"values":["Default Title"]}],"images":[],"image":null}}
- Note that access to https://dslfkgjskldjfgsd.myshopify.com/products/tee.json or https://dslfkgjskldjfgsd.myshopify.com/products/tee/ is closed.
This type of request with the "channel=buy_button" parameter in the URL is made when a Buy Button widget is added to the shop and an admin browses products to create a button for.
Recommendation: Ensure that proper authentication and authorization checks are performed for the affected request.
Context
Shopify lets a merchant put a shop into a password-protected state before it opens. In this state the storefront is gated: visitors are asked for the password and the product pages are not meant to be reachable. The report describes a shop in the "Opening Soon" stage, that is, one that is password-protected and not yet open to the public.
The feature involved is the Buy Button. When a merchant adds a Buy Button widget to a shop, the admin interface browses products in order to build a button for one of them. That browsing is done through a request that carries a channel=buy_button parameter in the URL. The report states that this type of request is made when a Buy Button widget is added to the shop and an admin browses products to create a button for.
The bug is that this particular request path does not enforce the password protection of the shop. An unauthenticated external attacker who knows, or can enumerate, the title of a product can retrieve the full product description, provided the product has been published.
Setup
The report does not describe any account, role, tool or version. The only precondition it names is on the attacker's side: the product title must be known or enumerable, and the product must have been published. The demonstration uses a password-protected shop at http://sdfg674567.myshopify.com/ and a product whose title is tee.
Finding it
The researcher noticed that the Buy Button product-browsing request, the one carrying channel=buy_button, was served without the shop's password gate being applied. Because that request is normally issued by an admin inside the shop administration while creating a Buy Button, it is a request the platform expects to serve product data for, but it is not a request that should be reachable by an anonymous visitor on a password-protected shop.
The result is that a product which is not yet visible on the storefront can be read through this side channel, as long as its title is known or can be guessed.
Exploitation
Step 1: confirm the shop is password-protected
Browse to the shop root:
http://sdfg674567.myshopify.com/
The shop is password-protected, confirming it is in the "Opening Soon" state and that the storefront is not open to the public.
Step 2: request the product through the Buy Button channel
Request the product by its title, appending the JSON extension and the channel=buy_button parameter:
http://sdfg674567.myshopify.com/tee.json?channel=buy_button
The response contains the full product object for the item titled tee, which should not otherwise be accessible:
{"product":{"id":3019937283,"title":"tee","body_html":"\u003cp\u003eThis is a hidden super secret Tee at an awesome price that will be published next year.\u003c\/p\u003e\n\u003cp\u003eYou should not be able to see it via:\u003c\/p\u003e\n\u003cp\u003ehttp:\/\/sdfg674567.myshopify.com\/products\/tee\u003c\/p\u003e","vendor":"sdfg674567","product_type":"","created_at":"2015-10-08T18:48:58-04:00","handle":"tee","updated_at":"2015-10-11T23:45:36-04:00","published_at":"2015-10-11T23:44:00-04:00","template_suffix":null,"published_scope":"global","tags":"","variants":[{"id":8803442371,"product_id":3019937283,"title":"Default Title","price":"11.00","sku":"","position":1,"grams":0,"inventory_policy":"deny","compare_at_price":null,"fulfillment_service":"manual","inventory_management":null,"option1":"Default Title","option2":null,"option3":null,"created_at":"2015-10-08T18:48:58-04:00","updated_at":"2015-10-08T23:30:52-04:00","requires_shipping":true,"taxable":true,"barcode":"","inventory_quantity":-124,"old_inventory_quantity":-124,"image_id":null,"weight":0.0,"weight_unit":"kg"}],"options":[{"id":3641130243,"product_id":3019937283,"name":"Title","position":1,"values":["Default Title"]}],"images":[],"image":null}}
The important parts of the response are the title and body_html fields, which carry the product name and its full description, and the variants array, which carries the price ("price":"11.00"). The description itself states that the item is a hidden product that will be published next year and that it should not be reachable through the normal product URL.
Step 3: confirm the normal paths are closed
The researcher notes that access to the following is closed:
https://dslfkgjskldjfgsd.myshopify.com/products/tee.json
https://dslfkgjskldjfgsd.myshopify.com/products/tee/
So the standard JSON product endpoint and the standard product page both respect the password protection, while the channel=buy_button variant of the request does not. The channel parameter is present on the request that returned the product, while the normal product paths were closed.
Root cause
The report attributes the issue to missing authentication and authorisation checks on the affected request. The Buy Button product-browsing request does not enforce the shop's password protection. The recommendation is to ensure that proper authentication and authorisation checks are performed for the affected request.
Why the existing defences did not stop it: the password protection is enforced on the storefront paths, as step 3 shows, but the channel-specific request path bypasses that enforcement. The report does not describe the implementation, so the exact reason the check is skipped on this path is not stated;
Impact
An external, unauthenticated attacker can bypass the password protection of a shop that is in the "Opening Soon" stage and obtain the full description of its products, provided the attacker knows or can enumerate the product title and the product has been published. The report notes that this could be used to obtain commercially sensitive information, such as retail prices of new products, and be used by competitor stores.
The two conditions matter: the attacker needs the title or must enumerate it, and the product must have been published.
Fix
The report recommends ensuring that proper authentication and authorisation checks are performed for the affected request.
Variants to test
- Try the same channel parameter on other product-related endpoints of a password-protected shop, for example the product JSON path with
?channel=buy_buttonappended, and compare against the same path without the parameter. A positive result is a full product object returned where the plain request is gated. - Try other channel values that correspond to embedded or widget features, since the report shows a channel parameter request returned product data on a password-protected shop. A positive result is any channel value that returns product data on a password-protected shop.
- Try the same pattern on other resource types that a widget might browse, such as collections, and check whether the gated shop returns them through a channel parameter. A positive result is any gated resource returned with its full body.
- On a shop where the product title is not known, test whether titles can be enumerated through the same request, for example by requesting a guessed title and observing whether a product object or an error is returned. A positive result is a distinguishable response for existing versus non-existing titles.
Hunting notes
This kind of bug tends to hide in secondary request paths that exist to serve embedded features, such as widgets and buttons, rather than the main storefront. The signal during recon is a shop that is password-protected at its root but whose product data can still be reached through a parameterised request, especially one whose parameter names a channel or an integration. The report shows the minimal proof: the gated root, the working request with the channel parameter, the returned product object including its description and price, and the closed normal paths for contrast. That contrast is what establishes that the gate exists and that this path bypasses it, and it is also what makes the impact concrete: a hidden product's description and price are readable by anyone who knows its title.
What happened, in plain words
Shopify is a platform that lets anyone set up an online shop. Before a shop opens to the public, the merchant can put it into a password-protected state, often shown as "Opening Soon". In that state, visitors are asked for a password, and the product pages are not supposed to be reachable by anyone who does not have it.
This report describes a way around that protection. A shop in the "Opening Soon" stage could still have its product details read by an outsider who did not have the password. The outsider only needed to know, or guess, the title of a product, and the product had to have been published. The attacker has to know or enumerate the title: trying titles to see which ones exist.
The feature at the centre of it is the Buy Button. A Buy Button is a widget that a merchant can add to the shop; the admin browses products to create a button for. To build one, the merchant's admin interface has to browse the shop's products and pick one. That browsing is done through a request that carries a channel=buy_button parameter in the URL. The report states that this type of request is made when a Buy Button widget is added to the shop and an admin browses products to create a button for.
The bug is that this particular request does not check the shop's password. So a request normally made when an admin browses products for a Buy Button could be sent by anyone, and it returned the full product description even though the shop was locked.
The setup
The report does not describe any account, role, tool or version. The only precondition it names is on the attacker's side: the product title must be known or enumerable, and the product must have been published. The demonstration uses a password-protected shop at http://sdfg674567.myshopify.com/ and a product whose title is tee.
Finding it
The researcher noticed that the Buy Button product-browsing request, the one carrying channel=buy_button, was served without the shop's password gate being applied. Because that request is normally issued by an admin inside the shop administration while creating a Buy Button, it is a request the platform expects to serve product data for, but it is not a request that should be reachable by an anonymous visitor on a password-protected shop.
The result is that a product which is not yet visible on the storefront can be read through this side channel, as long as its title is known or can be guessed.
A useful comparison: think of a shop with a locked front door. The shopkeeper has a back entrance for deliveries. If the back entrance is left unlocked, anyone who knows it is there can walk in, even though the front door is firmly shut. The channel=buy_button request is that back entrance.
Exploitation
Step 1: confirm the shop is password-protected
First, the researcher opened the shop's main address in a browser:
http://sdfg674567.myshopify.com/
This is the root of the shop, the page a normal customer would land on. The shop was password-protected, confirming it was in the "Opening Soon" state and that the storefront was not open to the public. This step matters because it establishes the baseline: the shop really is locked, so anything readable afterwards is a bypass.
Step 2: request the product through the Buy Button channel
Next, the researcher asked for a specific product by its title, adding the JSON extension and the channel=buy_button parameter:
http://sdfg674567.myshopify.com/tee.json?channel=buy_button
Breaking this URL down:
http://sdfg674567.myshopify.com/is the shop's address.teeis the product title, placed directly in the path..jsonasks the server to answer with data in JSON format rather than a web page. JSON is a plain text format for structured data, made of names and values in curly braces, which programs can read easily.?channel=buy_buttonis a parameter, a small piece of extra information attached to the request after a question mark. Here it tells the server that the request comes from the Buy Button feature.
The response contained the full product object for the item titled tee, which should not otherwise have been accessible:
{"product":{"id":3019937283,"title":"tee","body_html":"\u003cp\u003eThis is a hidden super secret Tee at an awesome price that will be published next year.\u003c\/p\u003e\n\u003cp\u003eYou should not be able to see it via:\u003c\/p\u003e\n\u003cp\u003ehttp:\/\/sdfg674567.myshopify.com\/products\/tee\u003c\/p\u003e","vendor":"sdfg674567","product_type":"","created_at":"2015-10-08T18:48:58-04:00","handle":"tee","updated_at":"2015-10-11T23:45:36-04:00","published_at":"2015-10-11T23:44:00-04:00","template_suffix":null,"published_scope":"global","tags":"","variants":[{"id":8803442371,"product_id":3019937283,"title":"Default Title","price":"11.00","sku":"","position":1,"grams":0,"inventory_policy":"deny","compare_at_price":null,"fulfillment_service":"manual","inventory_management":null,"option1":"Default Title","option2":null,"option3":null,"created_at":"2015-10-08T18:48:58-04:00","updated_at":"2015-10-08T23:30:52-04:00","requires_shipping":true,"taxable":true,"barcode":"","inventory_quantity":-124,"old_inventory_quantity":-124,"image_id":null,"weight":0.0,"weight_unit":"kg"}],"options":[{"id":3641130243,"product_id":3019937283,"name":"Title","position":1,"values":["Default Title"]}],"images":[],"image":null}}
Reading this JSON in plain words:
- The whole answer is wrapped in
{"product":{ ... }}, meaning it is one product record. "id":3019937283is the internal number the platform uses to identify this product."title":"tee"is the product name."body_html"holds the full description, written in HTML (the language of web pages). The\u003cand\u003esequences are just how the JSON format stores the<and>characters, and\/is a stored/. Decoded, the description says the item is a hidden super secret Tee at an awesome price that will be published next year, and that it should not be reachable through the normal product URL."vendor"is the merchant name,"handle"is the short name used in the product's web address, and thecreated_at,updated_atandpublished_atfields are timestamps."variants"is a list of the buyable versions of the product. Here there is one, and it carries"price":"11.00", the retail price."options"lists the choices a buyer can make, here just a default title, and"images"is empty.
The important parts are the title and body_html fields, which carry the product name and its full description, and the variants array, which carries the price ("price":"11.00"). The description itself states that the item is a hidden product that will be published next year and that it should not be reachable through the normal product URL.
Step 3: confirm the normal paths are closed
The researcher notes that access to the following is closed:
https://dslfkgjskldjfgsd.myshopify.com/products/tee.json
https://dslfkgjskldjfgsd.myshopify.com/products/tee/
The first is the standard way to ask for a product's data in JSON: the address starts with /products/, followed by the product name and .json. The second is the standard product page a customer would see in a browser. Both of these respected the password protection, so access to them was closed.
This comparison is the heart of the proof. The same product, on the same kind of locked shop, is refused through the normal addresses but handed over through the channel=buy_button address. The channel parameter is present on the request that returned the product, while the normal product paths were closed.
Root cause
The report attributes the issue to missing authentication and authorisation checks on the affected request. Authentication means proving who you are, for example by entering a password. Authorisation means deciding what you are allowed to do once you are known. The Buy Button product-browsing request does not enforce the shop's password protection. The recommendation is to ensure that proper authentication and authorisation checks are performed for the affected request.
Why the existing defences did not stop it: the password protection is enforced on the storefront paths, as step 3 shows, but the channel-specific request path bypasses that enforcement. The report does not describe the implementation, so the exact reason the check is skipped on this path is not stated;
Impact
An external, unauthenticated attacker can bypass the password protection of a shop that is in the "Opening Soon" stage and obtain the full description of its products, provided the attacker knows or can enumerate the product title and the product has been published. The report notes that this could be used to obtain commercially sensitive information, such as retail prices of new products, and be used by competitor stores.
The two conditions matter: the attacker needs the title or must enumerate it, and the product must have been published.
Fix
The report recommends ensuring that proper authentication and authorisation checks are performed for the affected request.
Variants to test
- Try the same channel parameter on other product-related endpoints of a password-protected shop, for example the product JSON path with
?channel=buy_buttonappended, and compare against the same path without the parameter. A positive result is a full product object returned where the plain request is gated. - Try other channel values that correspond to embedded or widget features, since the report shows a channel parameter request returned product data on a password-protected shop. A positive result is any channel value that returns product data on a password-protected shop.
- Try the same pattern on other resource types that a widget might browse, such as collections, and check whether the gated shop returns them through a channel parameter. A positive result is any gated resource returned with its full body.
- On a shop where the product title is not known, test whether titles can be enumerated through the same request, for example by requesting a guessed title and observing whether a product object or an error is returned. A positive result is a distinguishable response for existing versus non-existing titles.
Hunting notes
This kind of bug tends to hide in secondary request paths that exist to serve embedded features, such as widgets and buttons, rather than the main storefront. The signal during recon is a shop that is password-protected at its root but whose product data can still be reached through a parameterised request, especially one whose parameter names a channel or an integration. The report shows the minimal proof: the gated root, the working request with the channel parameter, the returned product object including its description and price, and the closed normal paths for contrast. That contrast is what establishes that the gate exists and that this path bypasses it, and it is also what makes the impact concrete: a hidden product's description and price are readable by anyone who knows its title.
Glossary
- API: a way for one program to ask another for data or actions, usually over the web, without a human clicking through pages.
- Authentication: proving who you are, for example with a password or a login session.
- Authorisation: deciding what a known user is allowed to see or do.
- Buy Button: a Shopify widget that lets a merchant sell a product from another website, outside the shop itself.
- Channel parameter: an extra piece of information in a URL, after the
?, that tells the server which feature or integration the request comes from; herechannel=buy_button. - Endpoint: a specific address on a server that accepts requests and returns a particular kind of answer.
- Enumeration: trying many possible values one by one, such as product titles, to discover which ones exist.
- HTML: the language used to write web pages and formatted descriptions.
- JSON: a plain text format for structured data, made of names and values, easy for programs to read.
- Parameter: a small piece of extra information attached to a request, usually after a question mark in the URL.
- Password protection (storefront gate): a setting that makes a shop ask for a password before showing its pages, used before a shop opens.
- Published product: a product that has been made available in the shop's data, as opposed to an unpublished draft.
- Root cause: the underlying reason a bug exists, as opposed to its visible symptom.
- Side channel: an indirect way of reaching information that the normal, intended route refuses to give.
- Storefront: the public-facing part of an online shop that customers see.
- Title enumeration: guessing or trying product titles to find ones that exist.
- Unauthenticated: acting without logging in or proving an identity.
- Variant: a specific buyable version of a product, such as a size or colour, which carries its own price and stock.
- Widget: a small embeddable piece of a website that can be placed on another page.