Skip to content
Access control Write-up Intermediate

The Bind Escalate And Impersonate Verbs In The Kubernetes Cluster

The blog post explains that Kubernetes RBAC verbs bind, escalate, and impersonate can allow a service account to elevate its privileges. An attacker with these permissions could bind a role to itself, modify a role to add permissions, or impersonate a more privileged account.

Yani Follow

Published on infosecwriteups.com

Kubernetes role binding plays a critical role in controlling access to resources within a Kubernetes cluster, it grants the permissions defined in a role to a user or set of users. RBAC Role or ClusterRole consists of rules that define a specific set of permissions(in the forms of verbs) including some lesser-known…

Yani, on infosecwriteups.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the root cause is that the bind, escalate, and impersonate verbs grant the ability to change access control without possessing the underlying permissions, so a low-privileged account can elevate itself.

Impact

An attacker with these permissions could escalate their privileges within the cluster, potentially gaining the ability to create pods or impersonate other accounts.

What the attacker needed

Kubernetes cluster with RBAC enabled; Ability to create service accounts and roles; Service account with bind, escalate, or impersonate…

The fix

The blog does not state a specific fix, but it implies that these permissions should be granted with caution and RBAC practices should be reviewed.

How it was found

  1. Create a service account without any roles.
  2. Create a token for the service account and set up a kubectl context for it.
  3. As admin, create a ClusterRole with the bind verb and bind it to the service account.
  4. Switch to the service account context and create a role binding to grant itself a role it did not have permission to grant.
  5. As admin, create a ClusterRole with the escalate verb and bind it to the service account.
  6. Switch to the service account context and edit a role to add a new verb, then use the new permission.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Kubernetes uses roles to decide who can do what. Some special permissions let a user give themselves more power, like copying a key or pretending to be someone else. This post shows how those permissions work and why they are dangerous if given to the wrong account.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by Yani

View all

4 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.