H1514 [*.(my)shopify.com] - Viewing Password Protected Content
The theme preview feature generated a unique preview link without authentication, and previewing bypassed the storefront password protection. An attacker could obtain the preview link from the /preview_bar endpoint and view the password-protected shop's content without knowing the password.
- Triaged in 4 days
- Fixed in 42 days
- Paid in 4 days
- Disclosed after 7 months
Summary by the program
@corb3nik discovered a vulnerability on the theme preview feature that
could have allowed a malicious user to bypass the storefront password protection for
any store by accessing the /preview_bar endpoint and fetching the preview domain of
a store; giving them access to any information displayed in the storefront area.
The report
Hi guys!
When administering a shop, the owner has the ability to preview his shop with various themes. When previewing, a unique link is generated, which the owner can share with various people without any authentication.
The generation of that unique link does not require authentication, which means any user can generate a preview link and view the contents of the shop.
Previewing isn't affected by password protection, so a user who has managed to obtain a preview link can successfully view the shop's content without knowing the password.
Steps to Reproduce
- Visit the following shop : https://mycorb3nikshop.myshopify.com.
- Notice that it is protected by a password.
- Visit https://mycorb3nikshop.myshopify.com/preview_bar and view the page's source code.
- Search for a shopifypreview.com URL. This is the preview link generated for
mycorb3nikshop. - Visit the preview URL.
You should now see the contents of the shop. Note that we've successfully viewed the content without any authentication.

Impact
The impact of this bug is pretty straightforward. Because of the /preview_bar, the password protection is rendered useless.
Depending on the confidentiality of a shop's content, I would set the severity to either high or medium here :)
Context
Shopify stores can be password protected, so that visitors cannot see the storefront until they enter the password. Separately, the theme preview feature lets a shop owner look at the storefront with different themes before publishing them. When a preview is started, Shopify generates a unique preview link that the owner can share with other people without those people needing to authenticate.
The target here is a store on the your-store.myshopify.com domain, and the feature under examination is the preview link generation exposed through the /preview_bar endpoint. The report was filed against the Shopify program on HackerOne by @corb3nik, rated critical with a CVSS score of 9.3, and a bounty of 3000.00 USD was paid. It was disclosed on 2019-05-22.
Setup
No special tooling is described. The researcher used a test shop, mycorb3nikshop.myshopify.com, which was protected by a password. The only precondition is that the store has password protection enabled and that the preview feature is reachable. The report does not describe the researcher's account on that shop; the point is that the preview link can be obtained without authentication.
Finding it
The researcher started from how previewing works. When an owner previews a shop with a theme, a unique link is generated. That link can be shared with various people without any authentication, which is the intended behaviour: a preview link is meant to be a bearer capability.
The problem the researcher noticed is that the generation of that unique link does not require authentication either. Any user can generate a preview link and view the contents of the shop. On top of that, previewing is not affected by password protection, so a user who has managed to obtain a preview link can view the shop's content without knowing the password.
Put together, those two properties mean the password gate can be sidestepped: the unauthenticated generation of a preview link hands out a capability that the password protection does not cover.
Exploitation
Step 1: Visit the protected shop
https://mycorb3nikshop.myshopify.com
The shop is protected by a password, so a normal visitor cannot see the storefront content.
Step 2: Fetch the preview bar and read its source
https://mycorb3nikshop.myshopify.com/preview_bar
The researcher visited this endpoint and viewed the page's source code. The response contains a shopifypreview.com URL, which is the preview link generated for mycorb3nikshop. This is the core of the bug: the endpoint that hands out the preview link is reachable without authentication, so the link is not a secret held by the owner.
Step 3: Visit the preview URL
https://mycorb3nikshop.myshopify.com/preview_bar
With the shopifypreview.com URL taken from the source of the preview_bar page, the researcher visited the preview link. The contents of the shop were displayed, even though the shop is password protected and no password was supplied. The screenshot below accompanies this step.

Root cause
The preview link can be shared with various people without any authentication. The mistake is that the endpoint which generates and discloses that capability, /preview_bar, is itself unauthenticated. Anyone who can reach the store can ask for the preview link and receive it.
The second half of the problem is that previewing is not subject to the storefront password protection. Previewing is not affected by password protection, so a preview link shows the shop's content without the password. So the capability obtained from the unauthenticated endpoint is enough on its own to read the protected storefront.
Impact
Because of /preview_bar, the password protection is rendered useless. An attacker who can reach a protected store can obtain its preview link without authentication and then view the shop's content without knowing the password. The report notes that the severity depends on the confidentiality of a shop's content, and the researcher suggested either high or medium on that basis. The program's summary describes the issue as allowing a malicious user to bypass the storefront password protection for any store by accessing the /preview_bar endpoint and fetching the preview domain of a store, giving them access to any information displayed in the storefront area.
Fix
The report does not describe the fix that was applied.
Variants to test
- Other preview or design-mode endpoints on the same platform: request them unauthenticated on a password-protected store and look for a preview domain or token in the response source. A positive result is a preview URL that renders the protected storefront.
- Preview links shared by the owner: check whether a preview link issued for one shop can be reused against another shop, or whether it survives a password change. A positive result is content from a shop you are not entitled to see.
- Cached or indexed preview URLs: search for
shopifypreview.comstyle hosts belonging to protected stores. A positive result is a preview page that loads storefront content without a password. - Other bearer-capability features (share links, draft previews, staging URLs) on password-protected sites: request the capability anonymously and see whether it is issued. A positive result is a working capability handed to an unauthenticated client.
Hunting notes
This kind of bug tends to hide where a product has two access-control concepts that were built separately: a storefront password and a preview or sharing capability. The signal during recon is a password-protected storefront that still exposes a preview endpoint such as /preview_bar returning a preview link in its HTML source. Fetching the page and reading the source, rather than only looking at the rendered page, is what surfaces the preview domain.
The researcher showed impact by taking the preview URL from the unauthenticated endpoint and loading the protected storefront through it, with a screenshot of the content rendered without a password. That demonstration is what makes the bypass concrete: the password gate is shown to be ineffective.
What happened, in plain words
Shopify is a service that lets anyone build an online shop. Each shop lives at an address like your-store.myshopify.com. A shop owner can switch on a password for the shop, so that visitors cannot see the shop until they type the password. This is useful while the shop is still being built, or for a private shop.
Shopify also has a feature called theme preview. A theme is the look of the shop: colours, layout, fonts. Before publishing a new theme, the owner wants to see how it looks. So Shopify lets the owner preview the shop with that theme. When a preview starts, Shopify creates a unique preview link. The owner can send that link to other people, and those people do not need to log in to use it.
A preview link is like a guest pass to a building: whoever holds the pass can walk in, no name check needed. That is fine as long as the pass is only handed to people the owner trusts.
The researcher found two problems that combine badly:
- The page that hands out the preview link,
/preview_bar, does not ask anyone to log in. Anyone who can reach the shop can ask for the preview link and get it. - The preview link ignores the shop password. If you have the link, you see the shop, password or no password.
So a stranger can walk up to a password-protected shop, ask the shop for a guest pass, and use it to look inside. The password protection becomes useless.
The report was filed on HackerOne, a website where security researchers report bugs to companies. It was filed against the Shopify program by the researcher @corb3nik. It was rated critical, with a CVSS score of 9.3. CVSS is a standard scoring system for how serious a security bug is; 9.3 is near the top of the scale. A bounty of 3000.00 USD was paid, and the report was disclosed on 2019-05-22.
The pieces involved
Before the steps, here are the ideas you need. Each one is explained from zero.
- Storefront: the public part of a shop that customers see. Products, prices, descriptions, images.
- Password protection: a setting that puts a password gate in front of the storefront. Without the password, a visitor sees only the gate, not the shop.
- Theme: the design of the shop. Owners can try different themes before making one live.
- Preview link: a special web address that shows the shop with a theme that is not published yet. It works without logging in, by design, so the owner can share it.
- Endpoint: a specific address on a website that does one job. Think of a building with many doors, each door leading to a different room.
/preview_baris one such door. - Authentication: proving who you are, usually by logging in. Something is unauthenticated when it works without logging in.
- Page source: the raw text a web server sends to your browser. Your browser turns it into the page you see. Some information, like links, sits in the source and is not visible on the page itself. In most browsers you can right-click and choose something like "View Page Source".
- Bearer capability: a secret that works simply because you have it, like a ticket. No name on it, no login needed. Whoever holds it gets in.
- Bypass: getting past a control, such as a password gate, without satisfying it.
Setting up
The report describes no special tools. The researcher used a test shop, mycorb3nikshop.myshopify.com, which had password protection switched on. The only things needed are a browser and a shop with password protection enabled where the preview feature can be reached. The report does not describe the researcher's account on that shop. The whole point is that the preview link can be obtained without logging in at all.
Finding it
The researcher started by thinking about how previewing works. When an owner previews a shop with a theme, Shopify generates a unique link. That link can be shared with various people without any authentication. That is intended: a preview link is meant to be a bearer capability, a guest pass.
The problem is that generating the link does not require authentication either. Any user can generate a preview link and view the contents of the shop. And previewing is not affected by password protection, so a user who has managed to obtain a preview link can view the shop's content without knowing the password.
Put together, those two properties mean the password gate can be sidestepped. The unauthenticated generation of a preview link hands out a capability that the password protection does not cover.
Exploitation
Step 1: Visit the protected shop
https://mycorb3nikshop.myshopify.com
This line is the address of the test shop. You would type it into the address bar of a browser and press Enter. The shop is protected by a password, so a normal visitor cannot see the storefront content. The researcher visited it first to confirm the gate is there: this is the thing that is supposed to keep people out.
Step 2: Fetch the preview bar and read its source
https://mycorb3nikshop.myshopify.com/preview_bar
This line is the address of the endpoint that produces the preview bar, the small bar Shopify shows while previewing. The researcher visited this address and then viewed the page's source code. The response contains a shopifypreview.com URL, which is the preview link generated for mycorb3nikshop.
This is the core of the bug. The endpoint that hands out the preview link is reachable without authentication, so the link is not a secret held by the owner. Anyone who can reach the shop can read it out of the page source. Reading the source, rather than only looking at the rendered page, is what surfaces the preview domain: the link is in the raw text the server sends, not necessarily visible on screen.
Step 3: Visit the preview URL
https://mycorb3nikshop.myshopify.com/preview_bar
With the shopifypreview.com URL taken from the source of the preview_bar page, the researcher visited the preview link. The contents of the shop were displayed, even though the shop is password protected and no password was supplied. The screenshot below accompanies this step.

Why it worked
The preview link can be shared with various people without any authentication.
The mistake is that the endpoint which generates and discloses that capability, /preview_bar, is itself unauthenticated. Anyone who can reach the store can ask for the preview link and receive it. It is as if the reception desk handed a guest pass to anyone who walked in and asked, without checking whether they were invited.
The second half of the problem is that previewing is not subject to the storefront password protection. Previewing is not affected by password protection, so a preview link shows the shop's content without the password. So the capability obtained from the unauthenticated endpoint is enough on its own to read the protected storefront.
Impact
Because of /preview_bar, the password protection is rendered useless. An attacker who can reach a protected store can obtain its preview link without authentication and then view the shop's content without knowing the password.
The report notes that the severity depends on the confidentiality of a shop's content, and the researcher suggested either high or medium on that basis. The program's summary describes the issue as allowing a malicious user to bypass the storefront password protection for any store by accessing the /preview_bar endpoint and fetching the preview domain of a store, giving them access to any information displayed in the storefront area.
Fix
The report does not describe the fix that was applied.
Variants to test
These are related things to try, in the same spirit as the original finding.
- Other preview or design-mode endpoints on the same platform: request them unauthenticated on a password-protected store and look for a preview domain or token in the response source. A positive result is a preview URL that renders the protected storefront.
- Preview links shared by the owner: check whether a preview link issued for one shop can be reused against another shop, or whether it survives a password change. A positive result is content from a shop you are not entitled to see.
- Cached or indexed preview URLs: search for
shopifypreview.comstyle hosts belonging to protected stores. A positive result is a preview page that loads storefront content without a password. - Other bearer-capability features (share links, draft previews, staging URLs) on password-protected sites: request the capability anonymously and see whether it is issued. A positive result is a working capability handed to an unauthenticated client.
Hunting notes
This kind of bug tends to hide where a product has two access-control concepts that were built separately: a storefront password and a preview or sharing capability. The signal during recon is a password-protected storefront that still exposes a preview endpoint such as /preview_bar returning a preview link in its HTML source. Fetching the page and reading the source, rather than only looking at the rendered page, is what surfaces the preview domain.
The researcher showed impact by taking the preview URL from the unauthenticated endpoint and loading the protected storefront through it, with a screenshot of the content rendered without a password. That demonstration is what makes the bypass concrete: the password gate is shown to be ineffective.
Glossary
- API: a way for one piece of software to ask another for data or actions, usually over the web, without a human clicking through pages.
- Bearer capability: a secret that works simply because you hold it, like a ticket or guest pass; no login needed.
- Bounty: money a company pays a researcher for reporting a valid security bug.
- Confidentiality: keeping information from being seen by people who should not see it.
- Cookie: a small piece of data a website stores in your browser so it can recognise you on later requests, often used to keep you logged in.
- CVSS: a standard scoring system for the severity of a security bug, from 0 to 10.
- Endpoint: a specific web address that performs one job on a site.
- HackerOne: a website where security researchers report bugs to companies and companies pay bounties.
- HTML source: the raw text a web server sends to your browser, which the browser turns into the page you see.
- Password protection: a setting that puts a password gate in front of a shop so visitors cannot see it without the password.
- Preview link: a special web address that shows a shop with an unpublished theme, usable without logging in.
- Recon: the early stage of security testing where you look around a target to see what it exposes.
- Severity: how serious a bug is, often expressed as a word (low, medium, high, critical) or a CVSS score.
- Storefront: the public part of an online shop that customers see.
- Theme: the design of a shop: colours, layout, fonts.
- Token: a short piece of data that stands in for something else, such as proof of identity or permission to access something.
- Unauthenticated: working without logging in or proving who you are.
- URL: a web address, like
https://example.com/page. - Vulnerability: a weakness in software that lets someone do something they should not be able to do.