Behind a large share of the massive data breaches of recent years there is no sophisticated attack and no zero-day exploit: there is a misconfigured object storage bucket. Millions of customer records, full backups, internal documents and even credentials have ended up exposed on the internet simply because someone left a container accessible without authentication.
S3-compatible object storage is one of the most useful technologies in the cloud stack: scalable, cheap and accessible via API from any application. But that same ease of use has a dangerous flip side: a single click or one badly written line of policy can turn a private repository into a public folder indexable by Google. And unlike a compromised server, an open bucket leaves no trace of intrusion: anyone who knows the URL simply walks off with the data.
In this article we review the most frequent configuration mistakes that expose data in S3, the real risk of each one and how to prevent them. The good news is that almost all of them are avoided with a correct default configuration and a few disciplined operational practices.
Why Object Storage Is a Magnet for Breaches
The object storage model stores each file as an object inside a bucket, reachable by a URL and governed by a flexible permission system: access control lists (ACLs), bucket policies and identity policies (IAM). That flexibility is its strength and, at the same time, its Achilles' heel: there are many ways to grant access, and getting just one of them wrong is enough to open the door.
Most exposures do not stem from malicious intent, but from convenience during development: a team makes a bucket public to test quickly, promises to close it afterwards, and that "afterwards" never comes. The test configuration ends up in production, gets replicated in the next application by copy and paste, and the open permission becomes normal. When the bucket holds personal data, this stops being a technical slip and becomes a security breach with legal consequences under the GDPR.
Object storage appears recurrently in cloud security risk lists, and many of its root causes map to the categories of the OWASP Top 10: broken access control, security misconfiguration and sensitive data exposure. Let's look at the concrete patterns.
The Nine Most Common Configuration Mistakes
These are the failures that show up again and again in object storage audits and in breach reports:
- check_circle 1. Accidentally public bucket: an ACL or policy that allows anonymous access (grants permissions to the "everyone" group). It usually comes from a development convenience that reaches production without being reviewed.
-
check_circle
2. Over-permissive IAM policies:
s3:*wildcards in the actions andResource: *in the resources. Ignoring the principle of least privilege means a single compromised credential grants full access. -
check_circle
3. Leaked access keys:
access keyandsecretpushed to a Git repository, embedded in the code or inside a mobile app binary. Bots crawl GitHub looking for exactly this. - check_circle 4. No encryption at rest or in transit: objects are stored and travel in the clear. If someone intercepts the traffic or accesses the underlying storage, they read the data directly.
-
check_circle
5. Bucket listing enabled: allowing public
ListBucketlets anyone enumerate every object in the container, turning a one-off slip into a complete inventory for the attacker. - check_circle 6. No versioning or Object Lock: without immutability, an attacker (or a human error) can overwrite or delete all the content irreversibly, including the backups.
- check_circle 7. Predictable, unsigned URLs: sequential or guessable object names served without a signature allow brute-force access to content that was believed to be "hidden by obscurity".
- check_circle 8. Logging and monitoring disabled: without access logs, a breach is invisible. There is no way to know who downloaded what, or to reconstruct the incident afterwards.
- check_circle 9. Unclassified sensitive data: mixing confidential information with legitimately public content in the same bucket means any accidental opening exposes what should never have left.
Table: Mistake, Risk and Mitigation
The following table summarizes each configuration mistake, the specific risk it introduces and the recommended mitigation:
| Mistake | Risk | Mitigation |
|---|---|---|
| Accidentally public bucket | Full exposure of data to anyone on the internet | Block Public Access + review ACLs and policies |
| Over-permissive IAM policies (s3:*, Resource *) | Privilege escalation, exfiltration or deletion | Least privilege: specific actions and resources |
| Leaked access keys | Full access with stolen credentials | IAM roles / secrets manager + rotation |
| No encryption at rest or in transit | Readable data if intercepted or stolen | Mandatory SSE encryption + enforced HTTPS/TLS |
| Bucket listing enabled | Enumeration of every object in the container | Disable public listing, restrictive policies |
| No versioning or Object Lock | Irreversible deletion or ransomware | Versioning + Object Lock (WORM) |
| Predictable, unsigned URLs | Unauthorized access by guessing | Pre-signed URLs with expiry |
| Logging disabled | Invisible breach, no forensic capability | Access logging + configuration alerts |
| Unclassified sensitive data | Mix of public and confidential content | Classification and separation by bucket |
How to Prevent an Exposure: Secure by Default
The golden rule is that security must be the default state, not something added at the end. These are the measures that turn a bucket into a container that is hard to expose by mistake:
- arrow_right Block Public Access by default: enable the public access block at the account and bucket level. Opening a bucket should require an explicit, deliberate action, never a slip.
-
arrow_right
Least-privilege policies: grant only the actions (
GetObject,PutObject) on the exact resources each identity needs. Nos3:*wildcards, noResource: *. - arrow_right Mandatory encryption: enable server-side encryption (SSE) at rest and enforce HTTPS/TLS for all traffic. Deny by policy any request that does not come encrypted in transit.
- arrow_right Versioning + Object Lock for immutability: keep versions and apply WORM retention on critical data and backups, so that neither an attacker nor an error can delete them. We cover it in our guide on Object Lock and immutability in S3.
- arrow_right Pre-signed URLs with expiry: to share objects, generate signed links with a short lifetime instead of opening the bucket or publishing the object permanently.
- arrow_right Key rotation and no credentials in code: use IAM roles or a secrets manager, never embedded keys. Rotate credentials regularly and revoke them immediately on any suspicion.
- arrow_right Auditing, alerts and exposure scanning: enable access logging, set alerts when a bucket's configuration changes and periodically scan for exposed containers.
Rule of thumb:
Treat every bucket as private and encrypted by default. Opening access, disabling encryption or making an object public should always be an explicit, documented and reviewed decision, never the initial state inherited from a test.
Audit Tools: Configuration Scanners and CSPM
Spotting a misconfigured bucket by hand is unfeasible beyond a certain scale. This is where cloud security posture management (CSPM) tools and configuration scanners come in, continuously reviewing every bucket and flagging deviations from best practices.
A good scanner detects buckets with anonymous access, disabled encryption, public listing, missing versioning or wildcard policies. Many let you set a baseline and alert in real time whenever someone breaks it, so a dangerous change surfaces before it becomes a breach. Combining CSPM with the provider's own native public-access detection tools covers most of the risk surface.
To this it is worth adding secrets scanning in code repositories to catch leaked keys before they reach production, and periodic reviews of IAM policies to remove accumulated permissions that nobody uses anymore but that keep widening the attack surface.
Beyond Configuration: Where Your Data Lives
A perfectly configured bucket still raises a question that configuration alone does not answer: under which jurisdiction is your data? The storage location determines which legal framework applies. A container hosted by a provider subject to non-EU legislation may be exposed to access requests outside the scope of the GDPR, no matter how private and encrypted it is.
For personal data of European customers, technical security and data sovereignty go hand in hand: it is not enough to protect access, you have to guarantee that the information stays under the European data protection framework. We go deeper into this in our article on data sovereignty in national territory. And if you are wondering how this storage model grows without losing control, we have a dedicated guide on object storage scalability.
EasyDataHost: S3 Storage in Spain, Secure by Default
At EasyDataHost we offer S3 storage hosted in Spain with a secure-by-default philosophy that neutralizes most of the mistakes in this article:
- arrow_right Private buckets by default: public access is not the initial state. Opening access requires an explicit, deliberate action.
- arrow_right Encryption at rest and in transit: objects are stored encrypted and access always happens over TLS.
- arrow_right Versioning and Object Lock: WORM immutability to protect your data and backups against ransomware and accidental deletion.
- arrow_right Technical support and our own datacenter in Spain: we help you design least-privilege policies and audit your configuration, with data under the European framework.
If you want to review the security of your object storage or migrate to a secure-by-default platform, contact our team for a technical analysis with no obligation.
Frequently Asked Questions
How do I know if my S3 bucket is public?
Review the bucket ACLs and policy for grants to anonymous groups (for example Principal: "*" or AllUsers) and check whether Block Public Access is enabled. The most reliable approach is a configuration scanner (CSPM) that flags any bucket reachable without authentication. If you can list or download objects from an unauthenticated session, the bucket is public.
Is enabling Block Public Access enough?
It is essential, but not sufficient. Block Public Access prevents accidental anonymous exposure, but it does not protect against over-permissive IAM policies, leaked keys, missing encryption or the absence of versioning and Object Lock. Object storage security is a set of layers: access, encryption, immutability, auditing and data classification.
Why does it matter where my S3 data is stored?
Beyond being well configured, the storage location determines which legal framework applies to your data. A bucket hosted by a provider subject to non-EU legislation may be exposed to access requests outside the scope of the GDPR. Hosting your object storage in Spain guarantees that data stays under the European data protection framework and eases regulatory compliance.
Conclusion
Large object storage breaches are rarely the work of sophisticated attackers: they are the result of careless configuration that exposes data with one wrong click. The good news is that almost all of them are prevented with discipline and a secure-by-default setup:
- arrow_right Public access must be an explicit exception, not the default state: enable Block Public Access and review ACLs and policies.
-
arrow_right
Apply least privilege and protect credentials: no
s3:*wildcards, no keys in code; use roles and secrets managers with rotation. - arrow_right Encrypt, version and lock: mandatory encryption at rest and in transit, plus versioning and Object Lock for immutability against deletion and ransomware.
- arrow_right Audit and consider sovereignty: scan the configuration continuously and remember that where your data lives matters as much as how it is protected.