Antpact Toolbox
中文
Home › Blog › Network Tools › What 0.0.0.0/0 Really Means: How One CIDR Slip Exposed Our Database
Network Tools

What 0.0.0.0/0 Really Means: How One CIDR Slip Exposed Our Database

Oct 6, 2026 · 62 views · By Antpact Toolbox Team #net-cidr #security-group #0.0.0.0/0 #CIDR-calculator #cloud-misconfiguration

Last month a reader emailed me about something that still makes me wince. Their team had stood up a PostgreSQL instance for a weekend migration and, to make life easier, set the security-group inbound rule for port 5432 to 0.0.0.0/0. "Just for the weekend," they said. The weekend came and went, the rule stayed, and three days later AWS Trust & Safety emailed them that the instance was being abused — it had been hijacked and was mining crypto as part of the Kinsing botnet. The entry point wasn't a zero-day. It was a single line in a firewall.

Here's the thing most people miss: 0.0.0.0/0 is not "a wide range." It's the entire internet. The /0 means zero network bits are fixed, so it matches every IPv4 address on Earth. A public website needs 0.0.0.0/0 on 80 and 443 — that's expected. A database port (3306, 5432, 27017), SSH (22), or RDP (3389) with 0.0.0.0/0 is an open invitation.

What 0.0.0.0/0 actually does

In firewall rules, route tables, and cloud security groups, 0.0.0.0/0 means "any source." A 2026 cloud-security write-up noted that automated scanners now identify an open 0.0.0.0/0 rule within minutes of deployment, then move straight to credential stuffing or known-exploit payloads. So "I'll close it after the sync" is exactly the window attackers count on.

The traps nobody warns you about

Trap one: security-group rules are additive. If you add a precise allow rule for your office IP but leave the old 0.0.0.0/0 in place, both apply — and "both" means the open one still wins. You have to delete the loose rule, not just add a stricter one on top. My reader's team had done exactly that: they thought the new rule "overrode" the old. It didn't.

Trap two: /24 and /32 are not interchangeable. To allow a single host, you write /32 — e.g. 203.0.113.8/32. Slip to /24 and you've admitted all 254 addresses in that block. The /N in CIDR is the number of fixed network bits, not the host count. One extra host bit doubles the addresses; a missing one can lock out the traffic you meant to allow.

Trap three: "it's in a private subnet" is not a shield. A well-known AWS war story from 2026 describes an engineer who meant to restrict an internal admin panel to a VPN range (10.80.0.0/16) but tabbed out mid-click and left the source as 0.0.0.0/0. The private subnet still protected the backend — but the load balancer was now shouting the internal dashboard at the entire internet, reached from a random coffee-shop IP.

Why this keeps happening

Gartner and every major cloud provider will tell you the same thing: the vast majority of cloud breaches are customer misconfigurations, not provider flaws. In 2026 AWS best-practice guidance, exposed RDS and ElastiCache instances — often with both public accessibility and weak or no auth — are called out as the most damaging pattern, with ransomware groups encrypting data and demanding payment. None of that required a sophisticated hack. It required one rule left too open.

The quiet part is how fast it goes. Once a port is exposed, mass scanners find it in minutes. By the time anyone notices, the box is a miner, a relay, or a foothold.

Using a CIDR calculator as a backstop

Before you paste anything into a security group, calculate exactly what you're allowing. A CIDR calculator takes 203.0.113.8/32 and tells you it's a single host — network address, broadcast, usable count, the whole range — so you can see, in black and white, how many IPs you're letting in. Type your intended allowlist into it and ask: is this really just the one machine I meant to trust?

Three habits worth keeping: default to deny, allow only on exception; write /32 whenever you mean one host; and after any change, re-scan or re-check that the old loose rule is actually gone. The architecture diagram won't save you. Your fingers on the keyboard do — or they don't.

🛠CIDR CalculatorUse this tool in Antpact Toolbox →

← Back to blog