Cloud Security Misconfigurations and How to Prevent Them
Most cloud breaches come not from sophisticated attacks but from an open storage bucket or an over-privileged key. We walk through the most common mistakes and their lasting fixes.
Cloud providers secure the physical infrastructure, but everything you configure is your responsibility. This is the shared responsibility model, and most cloud breaches happen on your side of that line: a publicly exposed bucket, an access key that hasn't been rotated in years, or an admin permission granted "for now".
This article covers the misconfigurations we see most often in AWS, Azure and Google Cloud, how they are exploited, and how to close them for good.
Shared responsibility: where is the line?
| Layer | Provider | You |
|---|---|---|
| Physical data center, hardware | ✓ | |
| Virtualization layer | ✓ | |
| Identity and access management (IAM) | ✓ | |
| Network rules, security groups | ✓ | |
| Storage access policies | ✓ | |
| Application, data, encryption keys | ✓ |
1. Publicly exposed storage
The best-known and still the most common mistake. A developer makes an S3 bucket, Azure Blob container or GCS bucket public to serve static files; over time, backups, database exports or logs land in the same place.
A realistic scenario
An e-commerce company serves product images from a public bucket called company-assets. One day an employee uploads a customer list for analysis as export/customers-2026.csv. Because bucket names are guessable, automated scanners find the file within hours.
Prevention
- Block public access at the account level. Enable S3 Block Public Access account-wide in AWS, disable Allow Blob public access in Azure, enforce Public access prevention in GCP.
- Serve public content through a CDN with a private origin only the CDN can read (CloudFront OAC, Azure Front Door, Cloud CDN).
- Classify data. Tag buckets holding personal data and apply stricter policies to them.
# AWS: block public access account-wide
aws s3control put-public-access-block \
--account-id 123456789012 \
--public-access-block-configuration \
BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true
2. Over-broad IAM permissions
AdministratorAccess, Owner or *:* granted "to make it work" hands an attacker the whole account the moment a key leaks.
A realistic scenario
A CI/CD pipeline only uploads files to one bucket, but it was given a full-admin access key. The key is accidentally committed to a public Git repository. The attacker creates new users for persistence and launches expensive instances for crypto mining.
Prevention
- Least privilege: give each identity only the actions and resources it needs.
- Remove unused permissions: AWS IAM Access Analyzer, Azure access reviews and GCP IAM Recommender show permissions that are never used.
- Avoid long-lived keys: use short-lived, federated access such as GitHub Actions OIDC for CI/CD.
- Lock down root/owner accounts with hardware MFA and never use them day to day.
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": ["s3:PutObject"],
"Resource": "arn:aws:s3:::company-deploy/releases/*"
}]
}
3. Management ports open to the internet
Opening SSH (22), RDP (3389) or database ports to 0.0.0.0/0 makes a server a brute-force target within minutes.
- Use AWS Session Manager, Azure Bastion or GCP IAP for admin access without opening ports.
- Keep databases in private subnets reachable only from the application tier.
- Alert on security group changes.
4. Disabled or incomplete logging
After an incident the first question is "what happened?". Without CloudTrail, Azure Activity Log or GCP Cloud Audit Logs, you can't answer it.
- Log management events in all regions and ship logs to separate, immutable storage.
- Alert on root logins, MFA being disabled and new access keys.
5. Secrets embedded in code and images
- Store secrets in AWS Secrets Manager, Azure Key Vault or GCP Secret Manager.
- Scan with
gitleaksortrufflehogbefore commit and in CI. - Rotate any key you suspect has leaked; deleting it isn't enough, it stays in Git history.
The lasting fix: manage configuration as code
- Define infrastructure with Terraform/Bicep/CloudFormation; make manual console changes the exception.
- Catch misconfigurations automatically at pull request time with
checkovortfsec(Trivy). - Use a CSPM service to continuously monitor production: AWS Security Hub, Microsoft Defender for Cloud or Security Command Center.
- Baseline on CIS Benchmarks and report drift weekly.
Is public access blocked? Does the root account have hardware MFA? Any access keys older than 90 days? Are 22/3389 open to the internet? Are audit logs on in every region? These five answers tell half the story of your cloud security.
Conclusion
The most dangerous cloud gaps are often the simplest. The good news is that almost all of them can be found automatically, and once fixed as code they don't come back. If you want to see how your cloud looks through an attacker's eyes, our cyber security services include configuration reviews and penetration testing.
Are your systems truly secure?
Message us today for a free initial consultation. Let's assess your needs together.