Course contentsShow
← Security
Lesson 1665 of 3,05233. Container SecurityFree lesson

RBAC Privilege Escalation Risks

Identifying dangerous permissions like create pods, impersonate, and bind that can lead to cluster compromise.

RBAC Privilege Escalation Risks

What you'll learn: How certain Kubernetes RBAC permissions can be chained together to escalate privileges and compromise an entire cluster.

The Danger of "Innocent-Looking" Permissions

While RBAC (Role-Based Access Control) lets you control who can do what in Kubernetes, some permissions are far more dangerous than they appear. Even if you block direct admin access, certain combinations of seemingly limited permissions can allow attackers to escalate their privileges to full cluster control.

Think of it like giving someone a key to the mailroom instead of the vault — but the mailroom happens to contain keys to every other room in the building.

Critical Privilege Escalation Vectors

Create Pods Permission

The pods/create permission is deceptively dangerous. An attacker who can create pods can:

  • Mount the host filesystem and read sensitive files (like /etc/kubernetes/pki)
  • Use privileged containers to escape to the host
  • Mount service account tokens with higher privileges

Impersonate Permission

The impersonate verb lets users act as other users or service accounts. If you can impersonate a cluster-admin, you've effectively gained full control — no exploitation needed, just walking through the front door with a disguise.

Bind and Escalate Permissions

The rolebindings/create or clusterrolebindings/create permissions allow users to grant themselves (or others) new roles. Without the escalate restriction, a user with bind permissions can assign themselves cluster-admin rights directly.

Real-World Scenario

An attacker with pods/create in the default namespace creates a pod that mounts the node's /var/lib/kubelet directory, extracts all service account tokens, finds one with broader permissions, and uses it to gain cluster-admin access.

Key Takeaway: Dangerous RBAC permissions like create pods, impersonate, and bind can be chained to achieve full cluster compromise — always audit these permissions carefully and apply least-privilege principles rigorously.