Kubernetes Cross-Namespace Reachability: Testing Default-Deny Gaps With Two Tenants
A mTLS gateway protects one path. Test whether tenant A pods can still reach tenant B's ADB, VNC, or TURN ports directly — and prove it with the handshake.

Kubernetes Cross-Namespace Reachability: Testing Default-Deny Gaps With Two Tenants
TL;DR
Multi-tenant Kubernetes isolates tenants with namespaces, RBAC, and often an mTLS gateway — but a namespace is an API boundary, not a network boundary. Unless a NetworkPolicy selects a pod, a workload in tenant A can open a TCP connection straight to tenant B's pod IP on ports such as ADB 5555, VNC 5900, or a WebRTC signaling port, and those protocols carry no enterprise authentication of their own. Test it with two namespace-scoped tenant identities, compare a direct pod-to-pod probe against the gateway path, and treat the protocol handshake you get back as the finding. An open port is a lead; an unauthenticated banner or shell from another tenant's workload is proof.
What this is
Cross-namespace reachability testing answers one question: does the network path a tenant can actually take match the isolation the platform claims?
Three boundaries get conflated in most architecture diagrams:
- Control plane — RBAC, namespace-scoped service accounts, admission policy. Easy to test, and usually tested.
- Service path — the mTLS gateway, Envoy proxy, or bastion that terminates TLS and validates a JWT.
- Pod network — the CNI data plane, where pod IPs and ClusterIP services are routable unless a policy says otherwise.
Most multi-tenant designs invest heavily in the first two and assume the third follows. It doesn't. An mTLS gateway protects only the traffic that goes through the gateway; the pod network carries everything else. A pentester's job here is to find the traffic that never touches the enforcement point, and then show what that traffic can do.
Why it matters
Who is exposed: platform teams running shared EKS or GKE clusters, virtual device farms built on Cuttlefish-style Android containers, CI runners sharing a cluster with production namespaces, and any internal platform where "tenant" is implemented as "namespace."
What fails, concretely:
- The protocols have no authentication to fall back on. ADB over TCP in classic
adb tcpip 5555mode accepts connections without a key challenge; VNC's RFB handshake sends its protocol version before any credential exchange; raw TURN and WebRTC signaling have no path to your identity provider. When the protocol can't authenticate, the network is the only control. - One compromised pod becomes every reachable pod. Cross-namespace reachability turns a single workload compromise into lateral movement across tenant boundaries.
- Audit attribution breaks. If the architecture maps users to an STS
RoleSessionNamethrough a JWT identity chain, a session that bypasses the gateway produces no identity to attribute. You lose the log line, not just the control. - The isolation claim is false on paper. Customer-facing documentation and control matrices say "namespace-isolated." A successful probe says "namespace-labelled."
How it works
The networking.k8s.io/v1 NetworkPolicy API is stable, but the API object is not the control — enforcement is the CNI plugin's job (Kubernetes network policy documentation). A cluster running a CNI without policy support will accept your NetworkPolicy objects and enforce nothing, with no error at apply time. Verify enforcement, not just acceptance.
Two rules explain almost every gap found in the field:
- Policies are additive and namespaced. A pod is isolated in a direction only if some policy in its own namespace selects it for that direction. If no policy selects the pod, the default is allow-all.
- Pod IPs are real IPs. On EKS with the VPC CNI, pod addresses are routable in the VPC, so the reachable surface is not limited to ClusterIP services — a pod in tenant A can address a pod in tenant B by its pod IP directly.
The reference architecture AWS published for multi-tenant Kubernetes makes the dependency explicit: namespace-scoped mTLS gateways built on Envoy Gateway, cert-manager driving certificates through AWS Private CA, a managed TURN relay, and JWT identity chains tied to an enterprise IdP. It also states the assumption that makes the whole thing hold — default-deny NetworkPolicy in each tenant namespace, without which traffic can bypass the gateway (AWS Security Blog). That sentence is your hypothesis. Test it per namespace, not per cluster.
Detection and response

Telemetry worth wiring before you test, because you will want it during the retest:
- CNI-level flow data. eBPF observability (Cilium Hubble, Calico flow logs, or your CNI's equivalent) shows the policy decision — allowed or denied, source namespace, destination namespace, port. This is the record VPC Flow Logs cannot give you.
- VPC Flow Logs, with a caveat. With the AWS VPC CNI, traffic between two pods on the same node can stay on the instance and never appear in flow logs. Silence there is not evidence of isolation.
- Kubernetes audit log. Watch for
pods/exec,pods/portforward, and pod creation in namespaces the caller does not own. A port-forward into another tenant's namespace is the same finding by a different path. - Identity provider and STS.
AssumeRoleevents carrying aRoleSessionNamelet you attribute a session to a person — but only for sessions that went through the identity chain. Absence of attribution is itself a signal. - Certificate issuance. Unexpected
IssueCertificatecalls against your private CA mean a new mTLS identity exists that nobody asked for.
Protocol signatures that make a wire-level rule practical: the first bytes on TCP 5900 are RFB 003.00x before authentication; an ADB transport connection opens with a CNXN packet; TURN allocations go to 3478. Alert on any accepted connection to those ports whose source is outside the owning namespace.
The defender's check is a coverage query, not a scan: list every pod in a tenant namespace, then list the NetworkPolicies in that namespace and their selectors, and compute which pods no policy selects. Those pods are the ones your gateway architecture is trusting by accident.
What to do
- Inventory the tenant namespaces and listening ports.
kubectl get pods -o wide -n tenant-afor addresses, thenkubectl execand runss -lntpinside the workload to see what is actually listening — ADB, VNC, signaling, TURN. - Create two scoped tenant identities. Two service accounts with RBAC limited to their own namespaces, two kubeconfigs. Confirm first that tenant A cannot read tenant B's pods through the API. That is the control-plane test, and passing it tells you nothing about the data plane.
- Probe the direct path from tenant A. From a pod in tenant A, attempt TCP connections to tenant B's pod IPs and ClusterIPs on each listening port:
timeout 3 bash -c 'exec 3<>/dev/tcp/$POD_IP/5900' ; echo $?. - Run the same probe against the gateway path. The comparison is the evidence: if the gateway path rejects or requires a client certificate while the direct pod-to-pod path completes, you have shown the enforcement point is optional.
- Capture the handshake, not the connect.
timeout 3 bash -c 'exec 3<>/dev/tcp/$POD_IP/5900; head -c 12 <&3'returnsRFB 003.008— protocol-level proof that tenant B's service answered a foreign tenant with no credential. - Escalate from banner to impact where the protocol allows it. On a device farm,
adb connect $POD_IP:5555followed byadb devicesandadb shell getpropdemonstrates command execution against another tenant's virtual device. Store the terminal transcript with timestamps and the pod IPs. - Test the token-exchange path. If a custom API converts IdP JWTs into namespace-scoped TURN credentials, use tenant A's token and request credentials for tenant B's namespace. Record whether the request is scoped, what TTL the credential gets, and what happens on replay.
- Apply default-deny and retest the identical probes. Add a default-deny policy plus explicit allows in each tenant namespace, then re-run steps 3 through 6 from the same source pod. A probe that connected before and times out now is the fix, and the before/after pair is the retest evidence.
- Check the blind spots before calling it closed. Pods using
hostNetwork, node-to-pod paths, and any CNI mode where policy is not enforced will survive a clean retest of the ordinary pods.
FAQ
If I terminate mTLS at the gateway, am I done? No. The gateway authenticates traffic that enters through it. Pod-to-pod traffic that never transits the gateway is unauthenticated by construction — and on a VPC CNI cluster, that traffic can address pods directly by IP.
Do Kubernetes namespaces isolate network traffic? No. Namespaces scope API objects and RBAC. Network isolation comes from NetworkPolicy enforced by the CNI, and only for pods that a policy actually selects.
Does a NetworkPolicy cover all traffic for a pod? Not automatically. Policies are additive and direction-specific, and enforcement depends on the CNI. Pods on the host network, node-level traffic, and clusters whose CNI ignores policy objects fall outside the model you drew on the whiteboard.
Is ADB over TCP unauthenticated?
In the classic adb tcpip 5555 mode there is no key challenge — the connection is accepted. The TLS pairing flow Google introduced for wireless debugging on Android 11+ is a separate path on a different port. Check which mode your device farm exposes before you write the finding.
Why did my probe succeed when VPC Flow Logs show nothing? Because the packet never traversed the VPC network. With the AWS VPC CNI, two pods on the same node can communicate locally. Use CNI-level flow logs or eBPF observability for the policy decision, and keep the probe itself as the evidence.
What is the minimum evidence for this finding? A source identity (tenant A's namespace and service account), a destination (tenant B's pod IP and port), a completed handshake or command output from the foreign tenant's service, the timestamp, and the before/after comparison against the gateway path. Without the handshake it is a port scan; with it, a second researcher can reproduce the result.
Sources
- AWS Security Blog — Addressing protocol security gaps in multi-tenant Kubernetes: https://aws.amazon.com/blogs/security/addressing-protocol-security-gaps-in-multi-tenant-kubernetes/
- Kubernetes documentation — Network Policies: https://kubernetes.io/docs/concepts/services-networking/network-policies/
- Envoy Gateway documentation: https://gateway.envoyproxy.io/
- cert-manager documentation: https://cert-manager.io/docs/
- Android Developers — Android Debug Bridge (adb): https://developer.android.com/tools/adb
- Trusteed — exposure research and validation context: https://trusteed.io