Back

K07: Missing Network Segmentation Controls - Overview

What Are Missing Network Segmentation Controls?

Missing Network Segmentation Controls (K07 in the OWASP Kubernetes Top 10) is the failure to restrict which pods, namespaces, and external endpoints can talk to one another. By default, a Kubernetes cluster is a flat, fully-connected network: every pod can open a connection to every other pod, in every namespace, on every port—and, in most default installs, out to the internet and the cloud provider's metadata service as well. Nothing about that traffic is authenticated, encrypted, or restricted unless you add controls.

This is not a bug in Kubernetes; it is the documented default. The Kubernetes networking model requires that "all pods can communicate with all other pods without NAT." Segmentation is opt-in: you must author NetworkPolicy objects (and run a CNI that enforces them), or add a service mesh, to carve that flat space into isolated zones. When teams skip that step, one compromised pod inherits the reachability of the entire cluster.

Core Concept

Default cluster (flat network, no policy):

   [ frontend ]---+---[ payments-db ]      any pod can reach any pod,
        |         |                        any namespace, any port
        +---------+---[ admin-api ]
        |         |
        +---------+---[ kube-system pods ]  including the control plane's
        |         |                         service endpoints
        +---------+---> 169.254.169.254     cloud metadata / IMDS
        |         |
        +---------+---> 0.0.0.0/0            the entire internet (egress)

Segmented cluster (default-deny baseline + allow-list):

   [ frontend ] --allow--> [ orders-api ] --allow--> [ orders-db ]
        |                                                  ^
        X blocked: payments-db, admin-api, kube-system,    |
        X blocked: metadata endpoint, arbitrary internet   only this one flow

The distinction that defines K07 is default-allow vs. default-deny. A cluster with no policies is default-allow: everything is permitted, and an attacker who lands in any pod can immediately scan and reach everything else. A hardened cluster establishes a default-deny baseline per namespace (deny all ingress and egress), then explicitly allow-lists only the connections the application actually needs.

What "Missing Segmentation" Actually Covers

Why Does This Matter?

Network segmentation is the control that contains a breach. Most other controls (image scanning, RBAC, admission policy) aim to prevent a compromise. Segmentation assumes prevention will sometimes fail and limits how far the attacker can travel afterward. Without it, the blast radius of a single vulnerable pod is the whole cluster.

Business Impact

Technical Impact

Technical Context

Why the Default Is Flat

Kubernetes deliberately delegates networking to a CNI (Container Network Interface) plugin and mandates only one thing: pods must be able to reach each other directly. Whether that reachability can be restricted depends entirely on the plugin. Some plugins enforce NetworkPolicy; some historically did not. This is why "we wrote policies" and "our traffic is actually restricted" are two different claims.

NetworkPolicy is an API object; enforcement lives in the CNI.

  kube-apiserver  ->  stores the NetworkPolicy object
        (no enforcement here)
  CNI data plane  ->  MUST translate the policy into real filtering
        Calico / Cilium / others: enforce
        a plugin without policy support: object is inert, network stays flat

How NetworkPolicy Behaves (and Surprises People)

The Metadata Endpoint Problem

# From inside almost any pod on a default cloud cluster:
curl http://169.254.169.254/latest/meta-data/iam/security-credentials/
# -> returns the node instance role name
curl http://169.254.169.254/latest/meta-data/iam/security-credentials/<role>
# -> returns temporary AccessKeyId / SecretAccessKey / Token for the NODE role

Risk: The link-local metadata address is reachable from pods unless egress is restricted. On clusters that do not enforce IMDSv2 or block pod access to metadata, this converts an application-level SSRF (or any code execution in a pod) into theft of the node's cloud credentials, which are often far more privileged than the workload should be.

Where Segmentation Fails in Practice

GapTypical CauseConsequence
No policies at allSegmentation never adopted; "it works without it"Full flat network, unrestricted lateral movement
No default-denyOnly a few allow rules; unselected pods stay openMost traffic still unrestricted
Namespaces not isolatedNo cross-namespace deny; shared clusterCross-tenant / cross-env reachability
Egress unrestrictedOnly ingress consideredMetadata theft, C2, exfiltration
Internal services exposedDB/cache/admin reachable cluster-wideDirect data access after any foothold
No mTLSNo service identity layerImpersonation, sniffing, spoofed callers
CNI ignores policyPlugin without enforcement installedPolicies are inert; false sense of safety

Real-World Impact

The incident classes below are well-documented patterns. They are described generically rather than tied to fabricated numbers or CVE identifiers.

Incident Class 1: Compromised Pod to Cloud Credentials via Metadata

Pattern:

Root Cause: No egress policy blocking the metadata endpoint, combined with an over-privileged node role and metadata service defaults that allow simple retrieval. This class is the Kubernetes-native version of the classic SSRF-to-metadata cloud breach pattern.

Incident Class 2: Cryptomining Worm Spreading Across a Flat Cluster

Pattern:

Root Cause: No default-deny baseline and no namespace isolation, so a single foothold enjoyed cluster-wide reachability. Publicly analyzed Kubernetes-targeting malware families have repeatedly relied on exactly this flat-network reachability to move laterally.

Incident Class 3: Cross-Tenant Reach in a Shared Cluster

Pattern:

Root Cause: Namespaces provide an RBAC and naming boundary, not a network boundary. Without cross-namespace deny policies (or a mesh enforcing identity), tenant isolation on the network simply does not exist.

Incident Class 4: Direct Datastore Access After a Foothold

Pattern:

Root Cause: Internal services exposed cluster-wide with no ingress policy limiting callers to their intended clients. This mirrors the broader "unauthenticated datastore reachable on a flat network" class seen across cloud and container environments.

Prevalence and Severity

Missing segmentation is one of the most common Kubernetes weaknesses precisely because it is the default state—a cluster is unsegmented until someone does work to change it, and many clusters never do.

The defensible picture, without inventing statistics:

Note: treat any single percentage you see quoted as illustrative. The durable, source-independent truth is that Kubernetes networking is flat by default, so unsegmented clusters are common and their compromises escalate far beyond the initial foothold.

Common Misunderstandings

Myth 1: "Namespaces isolate workloads"

Reality: Namespaces isolate names and are an RBAC boundary. On the network they are transparent—pods in different namespaces reach each other by default. Network isolation requires NetworkPolicy or a mesh.

Myth 2: "We have NetworkPolicies, so we're segmented"

Reality: Policies are additive and only affect pods they select. Without a default-deny baseline in every namespace, every unselected pod is still fully open. And if the CNI does not enforce policy, the objects do nothing at all.

Myth 3: "Ingress rules are enough"

Reality: Blocking who can reach a pod does nothing about where that pod can go. Metadata theft, C2, and exfiltration are all egress. Segmentation needs both directions.

Myth 4: "Internal traffic is trusted, so we don't need mTLS"

Reality: "Inside the cluster" is not a trust boundary once any pod can be compromised. Without mTLS, services accept traffic from anything that can route to them and cannot tell a legitimate caller from an attacker.

Myth 5: "The cloud firewall / security groups already segment us"

Reality: Node-level firewalls see node IPs, not pod-to-pod traffic, most of which never leaves the node or rides an overlay the firewall cannot inspect. Pod-level segmentation must be enforced by the CNI or mesh, not the VPC.

Myth 6: "Restricting egress will break everything"

Reality: Default-deny egress with an explicit allow-list (DNS, required APIs, needed dependencies) is entirely workable and is the norm in mature clusters. The work is enumerating real flows once; the payoff is blocking metadata theft and exfiltration permanently.

How K07 Relates to Other Kubernetes Risks

AspectK07 Missing SegmentationK03 Overly Permissive RBACK01 Insecure Workload Config
BoundaryThe network (who can connect to whom)The API (who can call the control plane)The pod (privileges, capabilities)
FailureFlat, default-allow networkExcess API permissionsPrivileged/root containers
FixDefault-deny + allow-list, mesh mTLSLeast-privilege rolesRestrict securityContext
Main effectContains lateral movementContains API abuseContains pod escape

Key Takeaways

  1. The default is flat and default-allow—every pod can reach every pod, the metadata endpoint, and the internet until you restrict it.
  2. Segmentation is the containment control—it decides whether one compromised pod is an incident or a cluster-wide breach.
  3. Default-deny beats a handful of allow rules—without a deny baseline in every namespace, unselected pods stay wide open.
  4. Egress matters as much as ingress—blocking 169.254.169.254 and arbitrary internet access stops credential theft and exfiltration.
  5. A policy is only real if the CNI enforces it—and mTLS adds the identity layer the network alone cannot provide.

How to Identify if You're Vulnerable

Ask these questions about your cluster:

If you answered "no" or "not sure" to several of these, your cluster is likely running flat today, and any single compromised pod can reach far more than it should.

Next Steps