Every week, new security breaches surface at organizations of all sizes, and the number one cause is not sophisticated zero-day attacks; it is cloud misconfiguration. According to multiple industry reports, over 80% of cloud breaches stem from incorrect configurations, not platform vulnerabilities. In this article, we analyze the 10 most dangerous errors we consistently find during AWS and Azure security audits, with real-world examples, potential impact, and actionable prevention strategies.
Why Cloud Configuration Is the New Perimeter
The traditional security model was built around protecting the network perimeter: firewalls, DMZs, VPNs. In the cloud world, that perimeter has dissolved. Resources are deployed with a single click, APIs are exposed to the internet by default, and a single misconfiguration can leave terabytes of sensitive data accessible to the entire world.
The shared responsibility model is the foundational concept every organization must understand before migrating to the cloud. AWS, Azure, and Google Cloud are responsible for security of the cloud (physical infrastructure, hypervisors, global network), but the customer is responsible for security in the cloud (service configuration, access management, data encryption, network segmentation). This distinction is critical: if you leave an S3 bucket public or configure a Security Group that allows all traffic, the responsibility lies entirely with you.
The problem is compounded by the speed of deployment. In a traditional data center, provisioning a server took weeks and went through multiple reviews. In the cloud, a developer can deploy an internet-facing database instance in minutes without security ever being informed. The agility that makes the cloud attractive is also its greatest risk if not accompanied by proper controls.
The 10 Most Dangerous Errors
1. Public S3 Buckets and Blob Storage
This is arguably the most high-profile cloud misconfiguration. An Amazon S3 bucket or Azure Blob Storage container configured with public access allows anyone on the internet to list and download its contents without authentication.
The most well-known case is Capital One in 2019, where a misconfigured WAF enabled an attacker to access an S3 bucket containing data from over 100 million credit card customers and applicants. But it is far from isolated: Twitch, Accenture, Verizon, and dozens of government agencies have suffered similar exposures.
How to prevent it: Enable S3 Block Public Access at the account level. In Azure, disable anonymous public access on storage accounts. Use AWS Config or Azure Policy to automatically detect and remediate any public storage resource. Implement bucket policies that explicitly restrict access.
2. Overly Permissive IAM Policies
Identity and access management is the cornerstone of cloud security, yet it is where the most shortcuts are taken. Policies with "Effect": "Allow", "Action": "*", "Resource": "*" grant full administrator permissions across every resource in the account. It is the equivalent of giving every employee the master keys to the entire building.
In audits, we have found service accounts for applications running with full administrator permissions when they only needed to read from a single DynamoDB table. The principle of least privilege is widely understood but rarely applied with discipline.
How to prevent it: Implement granular IAM policies based on the principle of least privilege. Use IAM Access Analyzer in AWS or Azure AD Privileged Identity Management to identify unused permissions. Review policies periodically and remove unnecessary permissions. Never use the root account for day-to-day operations.
3. Unrestricted Security Groups and NSGs
AWS Security Groups and Azure Network Security Groups (NSGs) serve as the virtual firewall for your instances. A common error is creating rules that allow inbound traffic from 0.0.0.0/0 (any IP on the internet) across all ports or on sensitive ports such as SSH (22), RDP (3389), or databases (3306, 5432, 1433).
This error turns your instances into direct targets for automated scanners that continuously crawl the internet looking for exposed services. An RDP server exposed to the internet without additional protection can be compromised within hours through brute-force attacks.
How to prevent it: Restrict Security Groups and NSGs to the minimum necessary IP ranges. Use bastion hosts or access solutions like AWS Systems Manager Session Manager or Azure Bastion to access instances without exposing management ports. Implement automated rules that detect and close overly permissive Security Groups.
4. Disabled Logging and Monitoring
You cannot protect what you cannot see. Disabling CloudTrail in AWS, Azure Monitor, or diagnostic logs in Azure eliminates the ability to detect suspicious activity, investigate incidents, and meet regulatory requirements.
We have found organizations where CloudTrail was disabled across multiple regions, creating blind spots that an attacker could exploit to operate undetected. In other cases, logs were enabled but not sent to any analysis system, accumulating terabytes of data that nobody ever reviewed.
How to prevent it: Enable CloudTrail in all regions and configure it to send logs to a centralized S3 bucket with deletion protection. In Azure, enable diagnostic logs for all critical resources and route them to a Log Analytics Workspace. Implement alerts for high-risk events (IAM changes, access from unusual IPs, resource deletion). Consider a managed cybersecurity service to monitor your cloud environment 24/7.
5. Hardcoded Secrets in Code
API keys, database passwords, access tokens, and private certificates embedded directly in source code, configuration files, or visible environment variables. This is one of the most common and most easily exploitable mistakes.
A GitGuardian study revealed that in 2023 over 12 million exposed secrets were detected in public GitHub repositories. But the issue is not limited to public repos; private repositories also get compromised, and a single leaked secret can provide complete access to cloud infrastructure.
How to prevent it: Use AWS Secrets Manager, Azure Key Vault, or HashiCorp Vault to manage all secrets. Implement secret scanning tools in your CI/CD pipeline (git-secrets, truffleHog, GitLeaks). Rotate secrets periodically and set up alerts to detect exposure. Never store credentials in code, committed .env files, or plaintext environment variables.
6. Encryption Disabled at Rest and in Transit
Many cloud services do not enable encryption by default, or allow it to be disabled. Unencrypted RDS databases, unprotected EBS volumes, HTTP traffic without TLS between internal services. If an attacker gains access to the data, the absence of encryption means they can read it directly.
Encryption at rest protects against unauthorized physical access and attacks that compromise storage layers. Encryption in transit protects against interception of communications between services.
How to prevent it: Enable encryption by default on all services that support it: EBS, RDS, S3 (SSE), Azure Storage, Azure SQL. Enforce HTTPS on all endpoints and use TLS 1.2 or higher for inter-service communications. Implement policies that prevent the creation of unencrypted resources.
7. MFA Not Enabled on Root and Admin Accounts
The AWS root account or the Azure AD global administrator are the most powerful accounts in your cloud environment. If an attacker compromises these credentials without MFA, they have total control over all infrastructure, billing, and data. This is the single biggest point of failure in any cloud environment.
Despite all cloud providers emphatically recommending MFA activation, we continue to find organizations where the root account has no second authentication factor configured.
How to prevent it: Enable hardware MFA (YubiKey or similar) on the AWS root account. Enable Azure AD MFA for all global administrators. Do not use the root account for daily operations; create individual administrator accounts with MFA. Configure alerts for any root account usage.
8. Public Snapshots and Backups
AMIs (Amazon Machine Images), EBS snapshots, and RDS snapshots can be shared publicly, making them accessible to any AWS account. The same applies to disk and database snapshots in Azure. A public snapshot can contain production data, credentials, private keys, and the system's entire configuration.
In 2020, Cyble researchers discovered thousands of public EBS snapshots containing sensitive data from companies worldwide, including database credentials, API tokens, and personal data.
How to prevent it: Regularly audit the permissions on your snapshots and AMIs. Use AWS Config with the ebs-snapshot-public-restorable-check rule to detect public snapshots. In Azure, review permissions on managed disks and snapshots. Implement Service Control Policies (SCPs) in AWS Organizations that prevent public snapshot sharing.
9. Over-Privileged Lambda and Azure Functions
Serverless functions are fantastic for development agility, but they are frequently configured with overly broad IAM roles. A Lambda function that only needs to write to an SQS queue and read from a DynamoDB table should not have permissions to access S3, EC2, or IAM.
The risk is that if an attacker exploits a vulnerability in the function (code injection, insecure deserialization), they inherit all permissions assigned to the role. The broader the permissions, the larger the blast radius of the compromise.
How to prevent it: Create specific IAM roles for each function with the minimum necessary permissions. Use tools like AWS IAM Access Analyzer or Prowler to identify functions with excessive permissions. Implement security reviews of serverless code before deployment. Limit execution times and allocated resources for each function.
10. Lack of Network Segmentation
Deploying all resources in a single VPC without differentiated subnets, NACLs, or peering controls is equivalent to having a flat network where any compromised resource can freely communicate with all others. An attacker who compromises a web instance can move laterally until they reach the production database without encountering a single obstacle.
How to prevent it: Design your network architecture with clearly separated public and private subnets. Place databases and backend services in private subnets with no direct internet access. Use VPC Peering or AWS Transit Gateway with strict controls for inter-VPC communication. Implement NACLs as an additional defense layer on top of Security Groups. In Azure, use Virtual Networks with segmented subnets and per-subnet NSGs.
How to Detect These Errors
Identifying misconfiguration in cloud environments requires a combination of automated tooling and specialized manual review.
AWS Config and Azure Policy allow you to define compliance rules that continuously evaluate your resource configurations and alert when they deviate from defined standards. These are native tools and should be the minimum baseline.
Cloud Security Posture Management (CSPM) encompasses solutions like AWS Security Hub, Microsoft Defender for Cloud, Prowler, ScoutSuite, and Prisma Cloud that provide a centralized view of your cloud environment's security state, identifying misconfigurations, vulnerabilities, and compliance deviations.
Periodic cloud security audits conducted by specialized teams such as our cloud audit team provide an external perspective that complements automated tools. An experienced auditor identifies contextual risks, evaluates the architecture as a whole, and uncovers problems that automated tools miss.
Prevention Framework
Detecting errors is valuable, but preventing them is better. A robust prevention framework is built on four pillars.
Least privilege as a culture. This is not just an IAM policy; it is a mindset that should permeate every design decision. Every resource, every function, every user should have exactly the permissions they need and nothing more. This requires discipline and continuous review.
Infrastructure as Code (IaC). Terraform, CloudFormation, or Bicep allow you to define infrastructure declaratively, making it versionable and auditable. Combined with static analysis tools like Checkov, tfsec, or Terrascan, they enable you to detect misconfiguration before it ever reaches production. Infrastructure should never be deployed manually.
Security in the CI/CD pipeline. Integrate security checks at every stage of the deployment pipeline: secret scanning in code, static analysis of IaC, policy validation, and automated security tests. If you are building a secure pipeline, our SSDLC and DevSecOps service can help you integrate it properly.
Periodic cloud penetration testing. Automated tools cover known errors, but a cloud pentest conducted by professionals uncovers attack paths that combine multiple minor weaknesses into a serious compromise. We recommend performing cloud penetration tests at least once a year or after significant architecture changes.
Conclusion
Cloud misconfiguration errors are not minor issues; they are the most common entry point for cloud security breaches. The good news is that they are preventable with the right tools, processes, and mindset.
The key is combining automation (policies, IaC, CSPM) with human expertise (audits, penetration testing, training). No tool replaces the judgment of a security professional who understands your business context, and no professional can manually monitor thousands of cloud resources without tooling support.
If you manage infrastructure on AWS or Azure and have not conducted a cloud security audit recently, the time to do so is now. Every day that passes with an insecure configuration is a day of unnecessary exposure. Contact our team for a security assessment of your cloud environment.
About the author
Secra Solutions team
Ethical hackers with OSCP, OSEP, OSWE, CRTO, CRTL and CARTE certifications, 7+ years of experience in offensive cybersecurity, and authors of CVE-2025-40652 and CVE-2023-3512.
Meet the team →