Security group open to the whole internet (0.0.0.0/0)
A security group is AWS's instance-level firewall. When an inbound rule allows 0.0.0.0/0 (or ::/0 for IPv6), the port behind it is reachable from every address on the internet — not just your team.
Why it matters
Anything open to 0.0.0.0/0 is found within minutes: the whole IPv4 space is scanned continuously by bots looking for exposed SSH (22), RDP (3389), databases (3306, 5432, 6379, 27017) and admin panels.
Once a service is reachable, one weak password, a reused credential, or a known CVE in the software behind the port is a direct path in. Most cloud breaches start with a service that should never have been public.
How to check for it
- In the EC2 console, open Security Groups and look at the Inbound rules for a source of 0.0.0.0/0 or ::/0 on anything other than 80/443.
- From the CLI: aws ec2 describe-security-groups --query "SecurityGroups[?IpPermissions[?IpRanges[?CidrIp=='0.0.0.0/0']]]".
- Check every region — a security group left open in a region you forgot about is just as exposed.
How to fix it
- Replace 0.0.0.0/0 on the inbound rule with your office or VPN range, or a specific security group.
- aws ec2 revoke-security-group-ingress to remove the open rule, then authorize the narrow range.
- For admin access (SSH/RDP), prefer AWS Systems Manager Session Manager or a bastion over any public port.
SkyShield checks this automatically
Connect your AWS, Cloudflare, GitHub, GitLab, Hetzner or DigitalOcean account read-only and SkyShield flags this across every account and region, with the fix in plain words — alongside the agent that watches your servers. Start free.
FAQ
- Is 0.0.0.0/0 ever acceptable?
- Only for ports a public service genuinely needs — typically 80 and 443 behind a load balancer. Admin ports (22, 3389) and databases should never be open to 0.0.0.0/0.
- Does a security group replace a host firewall?
- It's a strong first layer, but defence in depth means keeping the OS firewall and patched software too. A single layer is a single point of failure.