[Information Disclosure] Amazon S3 Bucket of Shopify Ping (iOS) have public access of other users image
An Amazon S3 bucket used by Shopify Ping for chat images was publicly listable, so anyone could browse and view images belonging to other merchants and customers. An attacker could steal private images shared through the app.
- Fixed in 2 hours
- Paid in 5 days
- Disclosed after 23 days
Hello Shopify, when testing Shopify Ping share image function, I discovered an Amazon S3 bucket which has public access which allows an attacker to view all the image of other merchant & users.
Steps To Reproduce:
- Install Shopify Ping on your phone then enable Shopify Chat for your store.
- Go to your Shopify Store and start chatting as a customer. ███
- Log in to Staff account on Shopify Ping and click on send image ████████
- Back to Shopify Store as Customer and inspect the website code, you will find the URL of image ██████████ https://ping-api-production.s3.us-west-2.amazonaws.com/oks██████
- Now visit https://ping-api-production.s3.us-west-2.amazonaws.com, you can view all images of other stores. █████████
Impact
Using this Bucket access, a hacker can steal all private images of other stores and the user who shared through Shopify Ping.
What the report shows
The target is the image sharing feature of Shopify Ping, the iOS app used by merchants to chat with customers. While testing that feature, the researcher found an Amazon S3 bucket that allowed public access, and through it anyone could view the images that other merchants and users had shared.
The reproduction path in the report is short and relies on two roles: a customer chatting from a storefront and a staff member answering from Shopify Ping.
- Install Shopify Ping on your phone and enable Shopify Chat for your store.
- Go to your Shopify Store and start chatting as a customer.
- Log in to a Staff account on Shopify Ping and click on send image.
- Go back to the Shopify Store as the customer and inspect the website code. The URL of the image is visible there:
https://ping-api-production.s3.us-west-2.amazonaws.com/oks██████
- Visit the bucket root:
https://ping-api-production.s3.us-west-2.amazonaws.com
At that address, according to the report, all images of other stores can be viewed.
The report was rated medium severity and paid a bounty of 2,900 USD. It was disclosed on 21 November 2020. The text does not describe a fix or a timeline for one.
Root cause
The bucket holding chat images allowed public access, and its root exposed images of other stores. The bucket name appears in the image URL found in the storefront page code. Once the bucket root is reachable, images belonging to other stores can be viewed.
Impact
As the report puts it, an attacker with this bucket access can steal all private images of other stores and of the users who shared them through Shopify Ping. The images are those shared through Shopify Ping between stores and their users.
How this kind of bug works
Object storage services such as S3 serve each object from a URL that combines the bucket name and the object key. Access is controlled by bucket policy and by object ACLs. When a bucket is set to public read, anyone who knows a key can fetch the object; when it also allows listing, anyone can enumerate every key in the bucket without guessing.
This situation usually arises when a team wants uploaded files to be easy to serve, for example to embed them in a web page or a mobile client, and grants public read broadly instead of per object. Listing permission is often enabled by accident, for instance by applying a canned public policy or by leaving the default permissions of a bucket that was created for testing. The result is that the bucket becomes an open directory of everything ever uploaded, across all tenants.
Defences are straightforward in principle: block public access at the account or bucket level, keep listing disabled, serve objects through signed URLs with a short lifetime, and give each object a key that cannot be guessed. Where files must be private, the application should authorise the request before issuing a URL, rather than relying on the obscurity of the key.
How to test for it
Look for object storage hostnames in the places where the application hands file URLs to the client: page source, JSON API responses, mobile app traffic, and redirects after an upload. A hostname of the form bucket-name.s3.region.amazonaws.com or a custom domain that resolves to object storage is the signal.
- Capture the URL of an uploaded file and note the bucket name and the object key.
- Request the bucket root without credentials and observe whether a listing is returned.
- If listing is blocked, request a known object key without credentials and check whether the body is returned.
- Try the same object from a session belonging to a different account, to see whether access depends on the caller at all.
- Check whether keys are sequential or otherwise predictable, since that decides whether an attacker needs a listing or can simply guess.
A positive result is an unauthenticated response that contains object data or a key listing. Common false positives are buckets that return a listing but only of public assets such as static site files, objects that are public by design, and error pages that look like content but carry an access denied status. Confirm with the actual bytes of a file that belongs to another tenant before reporting.
How it is fixed
Enable the account level block for public access, remove public read and list grants from the bucket policy, and serve user files through short lived signed URLs issued only after the application has checked that the requester is entitled to the file. Keys should be random rather than derived from predictable values, and uploads should be separated per tenant so that a single misconfiguration cannot expose every customer at once.
Hunting notes
Chat, support and upload features are good places to start, because they move files between parties and often store them in a shared bucket. Mobile clients are worth inspecting since the storage hostname frequently appears in their network traffic. Recon signals include S3 hostnames in HTML and JSON, bucket names that contain words like production or api, and file URLs that lack signature parameters.
To make the report land, show a concrete object that belongs to another account, describe how you obtained its URL, and keep the proof minimal. Avoid downloading more data than needed to demonstrate the issue, and report the bucket rather than enumerating its contents in the write-up.
What happened, in plain words
Shopify Ping is an iOS app that merchants use to chat with their customers. One of its features lets a staff member send an image into a chat. While testing that feature, the researcher found that the images were stored in an Amazon S3 bucket that anyone on the internet could browse.
S3 is Amazon's file storage service. You can think of a bucket as a shared folder in the cloud: files are put in, and each file gets its own web address. Normally a folder like this is private, so only the owner can open it. Here the folder was open to the world, and its address showed images belonging to other stores. That meant anyone could open the bucket's address and look through images belonging to other stores and their customers.
The report was rated medium severity and paid a bounty of 2,900 USD. It was disclosed on 21 November 2020. The report does not describe a fix or a timeline for one.
How the researcher found it
The test used two roles at once: a customer chatting from a store's website, and a staff member answering from the Shopify Ping app. Having both sides lets you watch what happens to an image as it travels from one to the other.
- Install Shopify Ping on your phone and enable Shopify Chat for your store.
- Go to your Shopify Store and start chatting as a customer.
- Log in to a Staff account on Shopify Ping and click on send image.
- Go back to the Shopify Store as the customer and inspect the website code. The URL of the image is visible there:
https://ping-api-production.s3.us-west-2.amazonaws.com/oks██████
- Visit the bucket root:
https://ping-api-production.s3.us-west-2.amazonaws.com
At that address, according to the report, all images of other stores can be viewed.
Why each step matters:
- Step 1 and 2 set up a real conversation, so there is a genuine image to follow. Without a chat there is nothing to trace.
- Step 3 is the moment the image is uploaded. The app has to put the file somewhere, and that somewhere is what we want to learn.
- Step 4 is the key observation. The customer's browser has to load the image to display it, so the address of the image is sitting in the page. "Inspecting the website code" means opening the browser's developer tools and reading the HTML, the text that describes the page. The address found there is made of two parts: the bucket name,
ping-api-production, and the name of the individual file, which starts withoks. The bucket name is the part that matters, because it is the address the researcher then visited. - Step 5 is the test itself. Opening the bucket's address with no login and no special permissions is exactly what an outsider would do. If the server answers with images of other stores, the bucket is publicly accessible.
Why it is a problem
The images in a chat are meant to be seen only by the two people in that conversation. If the bucket lists and serves everything, then anyone who learns the bucket name can see images from unrelated stores. As the report puts it, an attacker with this access can steal all private images of other stores and of the users who shared them through Shopify Ping.
A useful comparison: it is as if every shop in a market posted letters through one shared postbox, and the postbox had a glass front and no lock. Each shop thinks its letters are private, but anyone walking past can read them all.
In general, how this kind of bug works
This class of problem is called information disclosure: private data becomes readable by people who should not see it. It is not about breaking encryption or guessing a password. It is about a storage setting that is simply too open.
Object storage such as S3 gives every file its own web address, built from the bucket name plus the file's name, called a key. Two separate permissions decide who can do what:
- Read lets someone download a file if they know its address.
- List lets someone see every file name in the bucket, without knowing any of them in advance.
Public read alone is already risky, because addresses can leak. Public list is worse, because it turns the bucket into an open directory. Public access was in effect here.
This usually happens for a practical reason. Teams want images to load quickly in a web page or a phone app, so they make the files public rather than checking permissions on every request. Listing is often switched on by accident, for example by applying a ready-made public policy or by leaving the defaults of a bucket created for testing. The result is one open folder holding files from every customer.
In general, the defences are simple to state:
- Block public access at the account or bucket level.
- Keep listing turned off.
- Serve files through signed URLs, which are addresses carrying a temporary permission that expires after a short time.
- Give each file a random name that cannot be guessed.
- Check that the requester is allowed to see the file before handing out its address, instead of relying on nobody finding it.
In general, how to test for it
Look for storage addresses wherever the application hands file links to the browser: page source, responses from the site's programming interface, mobile app traffic, and the page you land on after an upload. A hostname shaped like bucket-name.s3.region.amazonaws.com is the signal.
- Capture the address of an uploaded file and note the bucket name and the file name.
- Request the bucket root without logging in and see whether a list of files comes back.
- If listing is blocked, request a known file name without logging in and check whether the file itself is returned.
- Try the same file from a different account, to see whether access depends on who is asking at all.
- Check whether file names are sequential or otherwise predictable, since that decides whether an attacker needs a listing or can simply guess.
A positive result is a response with no login that contains file data or a list of file names. Watch for false alarms: a bucket that lists only public assets such as website files, files that are public on purpose, and error pages that look like content but actually carry an access denied status. Confirm with the real contents of a file that belongs to another customer before reporting.
When writing it up, show one concrete file that belongs to another account, explain how you obtained its address, and keep the proof small. Do not download more than you need, and describe the bucket rather than listing everything inside it.
Glossary
- S3 (Amazon Simple Storage Service): Amazon's cloud file storage; files are kept in containers called buckets.
- Bucket: a named container in S3 that holds files, like a folder in the cloud.
- Object: a single file stored in a bucket.
- Key: the name of an object inside a bucket, the part of the address after the bucket name.
- Bucket root: the address of the bucket itself, without any file name, which may show a list of contents.
- Public access: a setting that lets anyone on the internet read the contents without logging in.
- Listing: permission to see the names of all files in a bucket.
- Information disclosure: a bug where private data can be read by people who should not see it.
- URL: the address of a resource on the web.
- HTML: the text that describes a web page, which a browser reads and displays.
- Inspect (developer tools): a browser feature that shows the page's code and network activity.
- Signed URL: an address that carries a temporary permission and stops working after a set time.
- Access control: the rules that decide who is allowed to read or change something.
- Tenant: one separate customer or store sharing a system with others.
- Severity: a rating of how serious a bug is.
- Bounty: a payment made to a researcher who reports a valid security bug.