How a Public S3 Bucket Exposed Sensitive Data
An Amazon S3 bucket was misconfigured to allow unauthenticated listing and retrieval of objects, exposing sensitive files. An attacker could enumerate and download those files without credentials.
Published on medium.com
Cybersecurity
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.
Context
Amazon Simple Storage Service (S3) is widely used to store application files, documents, backups and other resources, and access to those resources is controlled through permissions and bucket policies. Two permissions matter most for this finding:
- s3:ListBucket: allows listing objects within a bucket.
- s3:GetObject: allows retrieving individual objects.
When either permission is unintentionally granted to the public, unauthorised users may be able to enumerate or access files that were intended to remain private. This write-up covers a bucket found during a security assessment that allowed anonymous listing and retrieval, the responsible disclosure that followed, and the remediation.
The author notes that certain technical details have been generalised to protect the affected organisation's identity, and that all examples shown are illustrative and do not contain actual organisational data.
Setup
The assessment involved an S3 bucket belonging to an affected organisation. No special tooling, credentials or versions are described: the discovery rested on unauthenticated HTTP requests to the bucket's storage endpoint, which is the point of the finding. The precondition is simply that the bucket is reachable over the internet and permits unauthenticated access.
Finding it
During the investigation the researcher identified an S3 bucket that permitted unauthenticated object listing. The storage endpoint returned an XML response containing object names and metadata without requiring valid credentials. That is the signal: a bucket that answers an anonymous ListBucket request is telling you, before you have authenticated as anything, what it holds.
Exploitation
Step 1: Identifying public bucket listing
An illustrative request and response for the listing are shown below.
HTTP request:
GET /?list-type=2 HTTP/1.1Host: [EXAMPLE-BUCKET].s3.amazonaws.comAccept: */*
The request targets the bucket root with list-type=2, which asks S3 for the version 2 listing format, and sends no authentication headers of any kind. The Host header addresses the bucket directly through the S3 endpoint.
Server response (illustrative):
<?xml version="1.0" encoding="UTF-8"?><ListBucketResult> <Name>[EXAMPLE-BUCKET]</Name> <Contents> <Key>documents/example-file.pdf</Key> <Size>2048</Size> </Contents></ListBucketResult>
The ListBucketResult body confirms the listing succeeded anonymously. Each Contents entry exposes a Key, the object path inside the bucket, and a Size. In the example that is documents/example-file.pdf at 2048 bytes. This demonstrates how an overly permissive bucket configuration can expose stored object metadata to unauthenticated users.
Step 2: Assessing object accessibility
Further investigation confirmed that the exposure extended beyond object listing. Files stored within the affected bucket could also be accessed without authentication, including resources containing sensitive information. In practice, the bucket was not only allowing anonymous listing but also anonymous retrieval, so the metadata obtained in step 1 could be turned into the objects themselves. This indicated that the storage configuration lacked appropriate access restrictions for the affected content.
Step 3: Evaluating the exposure
The investigation established that sensitive files were publicly accessible due to the misconfiguration. The potential impact depended on the nature and sensitivity of the exposed information. Importantly, publicly accessible files do not automatically establish that the information has been exploited or that downstream systems have been compromised.
Root cause
The vulnerability resulted from an insecure Amazon S3 configuration that unintentionally permitted public access to sensitive resources. The bucket configuration allowed the public to list and retrieve objects, so requests that carried no credentials were served like any other. Because the storage layer sits outside the application's own authentication and authorisation, the application's login controls offered no protection for these files. The report does not describe which specific policy statement or setting produced the grant.
Impact
The primary security concern was the unauthorised disclosure of sensitive information through publicly accessible cloud storage. Depending on the contents of an exposed bucket, potential consequences may include:
- Unauthorised access to confidential files.
- Exposure of sensitive application or operational information.
- Disclosure of credentials or other security-sensitive data.
- Increased risk of further compromise if the exposed information can be misused.
The finding demonstrated an access-control weakness that could have been exploited by unauthorised parties. No actual exploitation against end users was demonstrated, and public accessibility alone does not prove that the data was used.
Fix
After validating the finding, the researcher submitted a detailed vulnerability report to the affected organisation, including technical evidence, reproduction steps, an impact assessment and remediation recommendations. The organisation acknowledged the vulnerability and confirmed that the unintended public access had been remediated, and offered a $XXXX bug bounty in recognition of the disclosure.
The recommended remediation measures were:
- Restrict public access: remove unintended public object listing and retrieval permissions.
- Enable S3 Block Public Access: apply appropriate bucket and account-level protections.
- Enforce least privilege: grant access only to authorised users and services.
- Protect sensitive files: deliver private resources through authenticated and access-controlled mechanisms.
- Implement continuous monitoring: regularly audit cloud storage permissions and identify unintended public exposure.
Variants to test
- Anonymous listing on other buckets. Send the same
GET /?list-type=2request to bucket endpoints you are authorised to test. A positive result is aListBucketResultbody returned without credentials, withKeyentries you should not be able to see. - Anonymous object retrieval. For any key returned by a listing, request the object directly. A positive result is the object's content served to an unauthenticated client, which confirms
s3:GetObjectis also public. - Listing disabled but objects public. If the listing is refused, try known or guessable key paths. A positive result is a 200 response with content for an object whose name you supplied yourself, which shows retrieval is open even though enumeration is not.
- Bucket policy and ACL review. Where you have legitimate access to the configuration, check for principals set to
*and for public-read ACLs. A positive result is a grant to anonymous users that no one intended. - Account-level protections. Check whether Block Public Access is applied at bucket and account level. A positive result for a defender is both levels enabled; a finding is either level missing while public grants exist.
Not every security vulnerability requires complex exploitation techniques. Sometimes an overlooked access-control setting is enough to expose sensitive resources, which is why accurate impact assessment, least-privilege permissions and responsible disclosure all matter here.

What happened, in plain words
A security researcher was carrying out a security assessment and found a storage area in the cloud that anyone on the internet could open and read, without logging in. The storage area was an Amazon S3 bucket, which is a place where companies keep files such as documents, backups and application data. Because of a configuration mistake, the bucket let strangers see the list of files inside it and also download those files. Some of the files contained sensitive information.
The researcher reported the problem privately to the company. The company investigated, confirmed the issue, fixed it, and offered a bug bounty of $XXXX as a thank you. A bug bounty is a reward that organisations offer to people who find and report security problems responsibly.
The researcher has changed some technical details to protect the company's identity, and all examples in the write-up are illustrative, not real company data.
Understanding the vulnerability
Amazon S3 is a service for storing files in the cloud. Companies use it for application files, documents, backups and other resources. Access to those files is controlled by permissions and bucket policies. A permission is a rule that says who can do what. A bucket policy is a set of rules attached to the bucket that says who is allowed to access it and how.
Two permissions matter most here:
- s3:ListBucket: allows listing the objects (files) inside a bucket. Think of it as being allowed to read the table of contents of a box.
- s3:GetObject: allows retrieving an individual object. Think of it as being allowed to take a specific file out of the box.
When either permission is accidentally given to the public, unauthorised people may be able to see what files exist or download them. This write-up describes a bucket that allowed anonymous callers to list and retrieve objects, meaning anyone who sent a request without logging in. It also covers how the researcher reported the issue and how it was fixed.
Setup
The assessment involved an S3 bucket belonging to an affected organisation. The researcher did not use special tools, credentials or versions. The discovery relied on unauthenticated HTTP requests to the bucket's storage endpoint. An HTTP request is the message a browser or program sends to a web server to ask for something. Unauthenticated means the request carries no proof of who is making it, such as a username and password or a token. The storage endpoint is the web address of the bucket. The only precondition was that the bucket could be reached over the internet and permitted unauthenticated access. ACLs, or access control lists, are another way of setting who can access a resource.
Finding it
During the investigation, the researcher found an S3 bucket that allowed unauthenticated object listing. The storage endpoint returned an XML response containing object names and metadata without requiring valid credentials. XML is a text format for structured data, a bit like a carefully labelled form. Metadata is information about the files, such as their names and sizes, not the file contents themselves. This was the signal: a bucket that answers an anonymous listing request is telling you, before you have logged in as anything, what it holds.
Exploitation
Step 1: Identifying public bucket listing
The researcher sent a request to list the bucket's contents. An illustrative request and response are shown below.
HTTP request:
GET /?list-type=2 HTTP/1.1Host: [EXAMPLE-BUCKET].s3.amazonaws.comAccept: */*
This is the raw text of an HTTP request. Here is what each part means:
GET /?list-type=2 HTTP/1.1is the request line.GETis the method, meaning "give me something"./is the path, here the root of the bucket.?list-type=2is a query parameter that asks S3 for the version 2 listing format.HTTP/1.1is the version of the HTTP protocol being used.Host: [EXAMPLE-BUCKET].s3.amazonaws.comtells the server which website or bucket the request is for. The bucket is addressed directly through the S3 endpoint.Accept: */*tells the server that the client will accept any type of response.
The request contains no authentication headers of any kind. That is the point: it is sent as an anonymous stranger.
Server response (illustrative):
<?xml version="1.0" encoding="UTF-8"?><ListBucketResult> <Name>[EXAMPLE-BUCKET]</Name> <Contents> <Key>documents/example-file.pdf</Key> <Size>2048</Size> </Contents></ListBucketResult>
This is the server's answer, written in XML. Here is what each part means:
<?xml version="1.0" encoding="UTF-8"?>is the XML declaration, saying which version of XML is used and how the text is encoded.<ListBucketResult>is the opening tag of the result. It confirms that the listing succeeded.<Name>[EXAMPLE-BUCKET]</Name>shows the name of the bucket that was listed.<Contents>wraps one entry in the listing. Each entry describes one object.<Key>documents/example-file.pdf</Key>is the object's key, which is its path inside the bucket. In this example it is a PDF file in a folder calleddocuments.<Size>2048</Size>is the size of the object in bytes. 2048 bytes is about 2 kilobytes.</Contents>and</ListBucketResult>close the entry and the result.
The important point is that the server returned this listing without asking for any credentials. That shows how an overly permissive bucket configuration can expose stored object metadata to unauthenticated users.
Step 2: Assessing object accessibility
Further investigation confirmed that the exposure went beyond listing. Files stored in the affected bucket could also be accessed without authentication, including resources containing sensitive information. In practice, the bucket was not only allowing anonymous listing but also anonymous retrieval. That means the metadata obtained in step 1 could be turned into the actual files: once you know a file's name, you can ask for the file itself. This indicated that the storage configuration lacked appropriate access restrictions for the affected content.
Step 3: Evaluating the exposure
The investigation established that sensitive files were publicly accessible because of the misconfiguration. The potential impact depended on the nature and sensitivity of the exposed information. Importantly, publicly accessible files do not automatically prove that the information was exploited or that downstream systems were compromised. Downstream systems are other systems that might use the exposed data.
Root cause
The vulnerability resulted from an insecure Amazon S3 configuration that unintentionally allowed public access to sensitive resources. The bucket configuration allowed the public to list and retrieve objects, so requests that carried no credentials were served like any other. Because the storage layer sits outside the application's own authentication and authorisation, the application's login controls offered no protection for these files. Authentication is the process of proving who you are, for example with a username and password. Authorisation is the process of deciding what you are allowed to do. The report does not describe which specific policy statement or setting produced the grant.
Impact
The main security concern was the unauthorised disclosure of sensitive information through publicly accessible cloud storage. Depending on what an exposed bucket contains, possible consequences include:
- Unauthorised access to confidential files.
- Exposure of sensitive application or operational information.
- Disclosure of credentials or other security-sensitive data.
- Increased risk of further compromise if the exposed information can be misused.
The finding showed an access-control weakness that could have been exploited by unauthorised parties. No actual exploitation against end users was demonstrated, and public accessibility alone does not prove that the data was used.
Fix
After validating the finding, the researcher submitted a detailed vulnerability report to the affected organisation. The report included technical evidence, reproduction steps, an impact assessment and remediation recommendations. Reproduction steps are instructions that let someone else repeat the finding. The organisation acknowledged the vulnerability and confirmed that the unintended public access had been remediated. Remediated means fixed. The organisation offered a $XXXX bug bounty in recognition of the disclosure.
The recommended remediation measures were:
- Restrict public access: remove unintended public object listing and retrieval permissions.
- Enable S3 Block Public Access: apply appropriate bucket and account-level protections. Block Public Access is an S3 setting that overrides attempts to make a bucket public.
- Enforce least privilege: grant access only to authorised users and services. Least privilege means giving each person or program only the access they need, nothing more.
- Protect sensitive files: deliver private resources through authenticated and access-controlled mechanisms.
- Implement continuous monitoring: regularly audit cloud storage permissions and identify unintended public exposure. An audit is a review of settings and activity.
Variants to test
These are other checks a researcher might try, but only on systems they are authorised to test.
- Anonymous listing on other buckets. Send the same
GET /?list-type=2request to bucket endpoints you are allowed to test. A positive result is aListBucketResultbody returned without credentials, withKeyentries you should not be able to see. - Anonymous object retrieval. For any key returned by a listing, request the object directly. A positive result is the object's content served to an unauthenticated client, which confirms
s3:GetObjectis also public. - Listing disabled but objects public. If the listing is refused, try known or guessable key paths. A positive result is a 200 response with content for an object whose name you supplied yourself. HTTP status code 200 means the request succeeded. This shows retrieval is open even though enumeration is not. Enumeration means listing or discovering items.
- Bucket policy and ACL review. Where you have legitimate access to the configuration, check for principals set to
*and for public-read ACLs. A principal is the identity a permission applies to, and*means everyone. A positive result is a grant to anonymous users that no one intended. - Account-level protections. Check whether Block Public Access is applied at bucket and account level. A positive result for a defender is both levels enabled. A finding is either level missing while public grants exist.
Not every security vulnerability requires complex exploitation techniques. Sometimes an overlooked access-control setting is enough to expose sensitive resources. That is why accurate impact assessment, least-privilege permissions and responsible disclosure all matter here.

Glossary
- ACL (access control list): a list of rules that says who can access a resource and what they can do with it.
- Anonymous caller: someone or something making a request without proving an identity, such as without logging in.
- Authentication: the process of proving who you are, for example with a username and password.
- Authorisation: the process of deciding what an authenticated (or anonymous) user is allowed to do.
- Block Public Access: an Amazon S3 setting that prevents a bucket or account from being made public, overriding other permissions.
- Bucket: a container in Amazon S3 that holds files, called objects.
- Bucket policy: a set of rules attached to an S3 bucket that defines who can access it and how.
- Bug bounty: a reward offered by an organisation to people who find and report security problems responsibly.
- Credentials: information that proves identity, such as a username and password or an access key.
- Downstream system: another system that uses or depends on the data in question.
- Endpoint: the web address of a service or resource.
- Enumeration: the act of listing or discovering items, such as the files in a bucket.
- GET: an HTTP method that asks a server to return a resource.
- Host header: the part of an HTTP request that tells the server which website or bucket the request is for.
- HTTP: the protocol used by browsers and other clients to communicate with web servers.
- HTTP status code 200: a response code meaning the request succeeded.
- Key: the path or name of an object inside an S3 bucket.
- Least privilege: the principle of giving each user or program only the access they need to do their job, nothing more.
- Metadata: information about data, such as a file's name and size, rather than the file's contents.
- Object: a file stored in an S3 bucket.
- Permission: a rule that allows or denies a specific action on a resource.
- Principal: the identity that a permission applies to, such as a user, a role or everyone (
*). - Public-read ACL: an ACL that allows anyone to read the resource.
- Remediation: the process of fixing a vulnerability.
- Reproduction steps: instructions that let someone else repeat a finding.
- Responsible disclosure: reporting a security problem privately to the organisation so it can be fixed before details are made public.
- S3 (Amazon Simple Storage Service): Amazon's cloud storage service for storing and retrieving files.
- s3:GetObject: an S3 permission that allows retrieving an individual object.
- s3:ListBucket: an S3 permission that allows listing the objects in a bucket.
- Unauthenticated: without proof of identity, such as without logging in.
- XML: a text format for structured data, using tags to label parts of the data.