Impact & Risk Analysis
- Severity: Medium (Level 2 - Defense in Depth)
- CIS Benchmark: CIS 5.3.2
- Impact: Lateral Movement. By default, Kubernetes allows all traffic between all pods in all namespaces (a flat network). If an attacker compromises a single pod (e.g., a frontend web server), they can scan and attack any other service in the cluster, including internal databases or management tools in other namespaces.
Common Misconfiguration
Running a cluster without anyNetworkPolicy objects. This leaves the cluster in a “default allow” state, where network segmentation relies solely on obscurity rather than active enforcement.
Vulnerable Example
Secure Example
Audit Procedure
Run the command below to review the Network Policy objects created in the cluster:- Result: The output lists all active policies.
- Fail: If you see namespaces (containing user workloads) that are not listed in the output. Every namespace should generally have at least a “default deny” policy or specific traffic rules.
Remediation
Create aNetworkPolicy for each namespace.
- Start with Default Deny: Apply a “Deny All” policy (see Secure Example) to switch the namespace from “Default Allow” to “Default Deny”.
- Whitelist Traffic: Create additional policies to explicitly allow necessary communication (e.g., “Allow Frontend to talk to Backend”).

