A bucket, a checkbox, and 106 million records
On March 22, 2019, Paige Thompson, a former Amazon Web Services engineer, sent a request to a Capital One web application firewall that it should never have been able to make. The request — a technique called server-side request forgery, or SSRF — tricked the server into asking Amazon's internal metadata service for the temporary credentials attached to the machine. Those credentials opened more than 700 of Capital One's storage buckets, and over two days Thompson pulled down about 30 gigabytes covering roughly 106 million credit card applicants.
Nobody exploited a zero-day, and nobody broke Amazon's infrastructure. The firewall was misconfigured so it could reach an internal service it had no business reaching, and the identity attached to it carried far more permission than a firewall ever needs. Capital One did not discover the breach until July 17, when a GitHub user tipped them off. Regulators later fined the bank $80 million, and in June 2022 Thompson was convicted on seven counts.
That is the shape of nearly every cloud breach: the providers spend billions hardening their data centres, and the breaches keep happening on the customer side of the line, in settings a human being chose. Gartner projected back in 2019 that through 2025, 99 percent of cloud security failures would be the customer's fault. The cloud is not insecure. The way most of us configure it is.
Whose job is the cloud, exactly?
Every cloud provider publishes a shared responsibility model, and the first misunderstanding most teams carry into the cloud is where the line sits. Amazon, Microsoft and Google secure the physical data centres, the hardware, the hypervisor and the network connecting their regions. That is their half. Everything above it — the operating system, the applications, the data, who can log in, who can read a storage bucket, whether it is encrypted — is yours.
The line moves depending on what you buy. With raw infrastructure, you own almost everything above the hypervisor. With a managed service, the provider takes on patching, but you still own the access rules and the data. With software as a service, the provider owns nearly the whole stack, and your job shrinks to managing accounts. The mistake is assuming the line sits lower than it does: teams migrate believing they have outsourced security, and nobody checks the settings that were never the provider's job.
That gap is where misconfigurations live. A misconfiguration is not a software bug. It is a setting that does exactly what somebody told it to do, and what somebody told it to do was wrong: a storage bucket set to public, a firewall rule that allows the whole internet, an identity with permission to read everything, a secret in a public repository, a database with encryption switched off. The setting is usually changed for a good reason — a developer opens a bucket to test something — and then the reason goes away and the setting stays. In the cloud, a misconfigured bucket has a public web address, reachable from anywhere on earth within seconds. One wrong setting can expose every customer record the company owns.
The five mistakes that keep showing up
Storage left open to the internet
The classic cloud misconfiguration is a public storage bucket — so easy to create by accident. On AWS, an S3 bucket is private by default, but a bucket policy, an access control list, or a click in a console can make it public, and once it is public, anyone who knows or guesses its address can read it. Bucket names are predictable — company names, words like backup, logs, or data — and attackers scan for them constantly.
In September 2017, UpGuard found four Accenture buckets open to the public, holding the company's cloud platform credentials, private keys, certificates, and, in the largest bucket, about 137 gigabytes of data including close to 40,000 passwords stored in plain text. The buckets were secured the day after UpGuard reported them. A bucket is not a folder on a shared drive. It is a website: private unless there is a documented reason for it to be public. Turn on block public access at the account level, require encryption on every bucket, and keep an inventory — you cannot protect storage you do not know exists.
Firewall rules that allow the whole internet
A security group that allows inbound traffic from 0.0.0.0/0 — the entire internet — on a port like 22 for SSH or 3389 for remote desktop is an open door, and scanners find it within minutes. The usual story is a developer opening a port to fix something from home, or a rule copied from a tutorial that used 0.0.0.0/0 as a placeholder.
Outbound rules matter just as much, and they get less attention. Capital One's breach turned on an outbound path: the firewall's machine could reach the internal metadata service, and that reach let the attacker trade a forged request for real credentials. An application server rarely needs to reach the metadata service at all. The rule is the same in both directions: allow only the traffic the workload genuinely needs, and deny the rest. Review security groups on a schedule, flag any rule that allows 0.0.0.0/0 on an administrative port, and use the provider's managed rules to block overly broad network access automatically.
Identities with more permission than they need
Over-permissive identity and access management, or IAM, is the mistake that turns every other mistake into a catastrophe. A public bucket exposes what is in that bucket. An over-privileged identity exposes everything it can reach, which in Capital One's case was more than 700 buckets. The WAF's role needed, at most, permission to read its own configuration. Instead it carried broad storage permissions, and the SSRF attack went from a trick that should have returned nothing to a breach of 106 million records.
This happens because granting broad permission is the fastest way to make something work. An application throws an access-denied error, a developer adds a wildcard permission, the error goes away, and the wildcard stays. Multiply that across hundreds of roles and nearly every identity can do nearly everything — and nobody reviews permissions after the project ships, so a role created for a migration keeps its migration permissions forever. Least privilege is the answer, and it is a discipline rather than a tool: give each role only the permissions its workload demonstrably uses, review the permissions the provider reports as unused, prefer short-lived credentials, and give workloads their own identities. Our guide to identity and access management walks through the same thinking applied to human users and cloud accounts.
Secrets that end up where they should not be
A leaked key is a misconfiguration of a different kind: a secret placed somewhere it does not belong. API keys, database passwords and private keys turn up in public code repositories, in chat messages, in configuration files committed to version control, in error logs, and in container images. Once a secret is in any of those places, it is effectively public, and automated scanners find newly committed secrets within minutes.
The Accenture buckets show how secrets and storage mistakes compound each other: they did not just contain customer data, they contained the keys to Accenture's own cloud accounts and its clients' systems. A single leaked credential can be the difference between a breach of one bucket and a breach of an entire cloud account. And unlike a password, a cloud API key does not expire on its own and can be used from anywhere in the world by anyone who holds it. The fix is to stop passing secrets around as text: store them in a managed secret store, inject them at runtime into only the workloads that need them, rotate them regularly, and scan repositories and images for secrets. Our article on secrets management covers the tooling in detail.
Data stored without encryption
Encryption is the last line of defence. If data is encrypted and the keys are managed properly, an attacker who copies a bucket still has to break the encryption to read anything. If it is not, the breach is complete the moment the data is copied.
Encryption is now the default almost everywhere: S3 encrypts new objects by default, managed databases offer encryption at rest with a checkbox, and the providers manage the keys unless you ask otherwise. The mistakes that remain are the exceptions — a legacy bucket created before the defaults changed, a database restored from an old snapshot without encryption, a backup in a separate account with different settings, or an application that stores sensitive fields in plain text because encryption was "a later phase" that never arrived. Make encryption a policy, not a choice: require it at the account and organisation level so a resource cannot be created unencrypted, keep the keys separate from the data, and encrypt in transit as well as at rest.
How attackers actually find these mistakes
Bucket hunting is the simplest version. Bucket names follow patterns, and lists of common names are public, so an attacker can try thousands of likely names and check which ones answer — and which of those are public. UpGuard's researchers did essentially this to find the Verizon and Accenture buckets; criminals do the same without the reporting step.
Network scanning works the same way. Tools like Shodan index every device and service visible on the internet, and anyone can search that index for databases listening on their default port with no password. An exposed database does not need to be discovered by a human being at all: the scanner finds it, the attacker connects, and the data is copied, sometimes within hours. Code repositories are a third hunting ground — a developer commits an AWS key to a public GitHub repository, and within minutes an automated scanner has found it and tried it.
The attacker only needs one of these to work, and they can try all of them at once, against every company, all the time. The defence has to be continuous: a setting that was correct yesterday can be wrong today, because somebody changed it at 2 a.m. to fix production.
Three breaches that should have changed everything
Capital One is the breach most people cite, but the pattern was visible years earlier. In June 2017, UpGuard's Chris Vickery found a Verizon supplier's S3 bucket — run by NICE Systems, a vendor working on Verizon's call centre systems — sitting open to the internet, holding call records and account PINs. UpGuard estimated as many as 14 million customers were affected; Verizon said the number was closer to 6 million, and maintained that no data was stolen, only exposed. Either way, the data had been sitting there since January, downloadable by anyone with the address. The bucket belonged to a vendor, not to Verizon itself — your cloud security is only as strong as the weakest supplier with access to your data.
Toyota's case, disclosed in May 2023, should worry teams most, because it was not a momentary lapse. A cloud setting had left vehicle location data for more than 2 million customers in Japan publicly accessible since 2012 — over a decade. Nobody noticed: the data sat there through audits and staff turnover, because no process would have caught it. A misconfiguration that lasts a week is a bad day; one that lasts eleven years is a missing process.
None of these cases involved a novel attack technique, or required the attacker to defeat the cloud provider. In each case, a human being changed a setting, or failed to check one, and the organisation had no automated check that would have caught it. The breach is the symptom; the missing check is the cause.
Why good teams still get this wrong
Speed is the first pressure. Cloud's whole promise is that a developer can provision infrastructure in minutes, and every security review that slows that down feels like a tax. So teams skip the review, open the bucket, grant the permission, and promise to tighten it later. Later rarely comes.
Complexity is the second. A single cloud account can hold hundreds of resources, and a large organisation can hold hundreds of accounts. No one person knows what all of them contain. Add a second cloud provider, and the settings do not even use the same names. Drift is the third: infrastructure created correctly can become incorrect over time, as people make changes through the console or defaults change under them. A bucket that was private when it was created can be made public by a colleague fixing a broken integration — and without a system that notices, drift is invisible until it is a breach.
Locking it down: prevention that holds
Prevention starts with one decision: no cloud resource should be created by hand in a console. Infrastructure as code — Terraform, CloudFormation, Pulumi, or the provider's own templates — means every resource is defined in a file and created by a pipeline. A bucket defined in code cannot be made public by a tired engineer at midnight: the code says private.
Code also makes scanning possible before anything is deployed. Tools like Checkov and tfsec read infrastructure code and flag the dangerous patterns: a public bucket, an open security group, an unencrypted database, a role with a wildcard permission. The check runs in the pipeline, the build fails, and the mistake never reaches production.
On top of the pipeline, the provider's organisation-level guardrails do the enforcing. AWS Organizations service control policies, Azure Policy, and Google Cloud's organisation policies can forbid entire categories of configuration across every account: no public buckets, no unencrypted storage, no security groups open to the internet on administrative ports. They are hard blocks, applying even to an administrator. Set them once, and the class of mistake they cover stops happening.
Least privilege needs the same treatment: make it the default, not a project. Give every workload its own identity with only the permissions it uses, require human access to go through short-lived, federated credentials rather than permanent keys, and remove permissions that have not been used in ninety days. When something breaks because a permission was removed, treat that as information: the break tells you what the workload actually needs, and you grant exactly that. Encryption and secrets belong in the same layer of policy, and so does backup: a misconfiguration can delete data as easily as it can expose it, and our guide to cloud backup and disaster recovery covers how to make sure a bad setting cannot destroy the only copy.
Catching what slips through: detection and response
Prevention will never be perfect, because people will always find a way around a control when production is down at 3 a.m. So the second half of the defence is detection: knowing, within minutes, when a setting has changed for the worse.
Cloud security posture management, or CSPM, is the tool built for this job. It continuously compares your cloud configuration against a set of rules — the CIS Benchmarks are the standard checklist — and raises an alert when something drifts out of line. The providers all ship their own versions: AWS Security Hub, Microsoft Defender for Cloud, Google's Security Command Center. Third-party tools cover multiple clouds from one console.
Logging is the other half. CloudTrail on AWS, Activity Logs on Azure, Cloud Audit Logs on Google — these record every API call, every change, every login, and they are the record you need when something goes wrong. The logs have to be turned on, stored somewhere the attacker cannot delete, and watched: an alert on a public bucket being created, a security group being opened, a new administrator being added. A log that nobody reads is a diary, not a control.
Detection is only useful if someone acts on it. The response to a public bucket is straightforward — make it private, check what was in it, check the access logs for who read it, rotate any secrets it contained — but doing that calmly at 2 a.m. requires a runbook written in advance. Test the runbook, run a tabletop exercise where someone plays the attacker, and treat near misses seriously: a CSPM alert that nobody acted on is a breach that has not happened yet. One more layer limits the damage when everything else fails: assume the network is hostile. Our article on zero trust architecture explains that thinking, and our container security guide covers the same patterns at the cluster level.
Questions teams ask about cloud misconfigurations
Is a public S3 bucket always a security problem?
Not always. Some buckets are meant to be public — one hosting a static website, or distributing public software. The problem is a bucket that is public by accident, holding data nobody intended to share. The test is simple: if you cannot name the reason a bucket is public, and the person who made it public, it should be private.
We are a small team. Do we really need CSPM and IaC scanning?
Yes, and small teams benefit most, because they have the fewest people watching the settings. The tools are cheap — many are free or built into the cloud console — and the checks they run are the ones a small team has no time to do by hand.
How do we find misconfigurations in an environment we inherited?
Start with a CSPM scan and a list of every public resource. Then work through the list in order of damage: public storage, open administrative ports, over-privileged identities, unencrypted data. Fix the public exposures this week, the identity problems this month, and the rest over the quarter.
What is the single most important fix?
Block public access at the organisation level and require infrastructure as code. The first removes the most common catastrophic mistake in one setting; the second makes every other mistake reviewable, testable and reversible.
What to do next: a 30-day fix list
Cloud misconfigurations are not a mystery and they are not a sophisticated attack. They are ordinary settings, changed by ordinary people, in systems that make it easy to change them and hard to notice the change. The fix is a short list of decisions, made once and then enforced by machines.
Week one: turn on block public access at the organisation level, enable encryption by default, and turn on the provider's logging and security hub. Run a CSPM scan.
Week two: make the public exposures private or document why they are public, close every security group rule that allows the whole internet onto an administrative port, and rotate any secret that has ever lived in a public bucket.
Week three: put infrastructure as code in place for new resources, add a scanning step to the pipeline, and start the least-privilege review.
Week four: write the runbook for the two incidents you are most likely to face — a public bucket and a leaked key — and walk through it with the team. Se
Comments
Post a Comment