Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
Kubernetes RBAC privilege escalation turns a narrow set of cluster permissions into cluster-admin by chaining verbs such as create pods, get secrets, impersonate, bind, and escalate.

What Is Kubernetes RBAC Privilege Escalation?
Kubernetes role-based access control looks reassuringly granular. You grant a service account the ability to list pods in one namespace and assume the blast radius stops there. In practice a surprising number of individually reasonable permissions are equivalent to cluster-admin once an attacker understands how the control plane works. Kubernetes RBAC privilege escalation is the process of finding and chaining those permissions, and it is one of the most productive things a tester can do inside a cluster.
Permissions are expressed as verbs on resources, collected into a Role (namespaced) or a ClusterRole, and attached to a subject through a RoleBinding or ClusterRoleBinding. Subjects are users, groups, or service accounts. By default a pod receives the token of the default service account in its namespace, mounted at a well-known path inside the container, which is the first thing an attacker reads after compromising an application.
RBAC is purely additive: there are no deny rules. Evaluating what a subject can really do therefore means working out the transitive closure of everything those verbs make possible, which is not something the API server shows you.
| Permission | Why it escalates |
|---|---|
create pods | Create a pod that runs as another service account in the namespace and read its token. Any namespace containing a privileged service account is now yours. |
get or list secrets | Service account tokens are secrets. Reading them in a namespace yields every identity in it. |
create pods/exec or pods/attach | Execute commands inside an existing privileged pod, inheriting its identity and mounts. |
escalate on roles | Explicitly permits granting yourself permissions you do not hold. It exists for controllers and is rarely needed elsewhere. |
bind on clusterroles | Create a binding that attaches cluster-admin to yourself without holding it first. |
impersonate | Act as any user, group, or service account in a single API call. |
create on serviceaccounts/token | Mint a token for a more privileged service account directly. |
get nodes/proxy | Reach the kubelet API and execute in any pod on that node. |
update on daemonsets or deployments | Modify a workload so it runs your image on every node, with whatever identity it already holds. |
Wildcards make this worse. A role granting verbs: ["*"] on resources: ["*"] in one namespace almost always contains at least one of the paths above.
The second escalation route leaves the API entirely. If a tester can schedule a pod with hostPID: true, a hostPath mount of /, or the privileged security context, they control the underlying node. From there they read the kubelet’s client certificate, every container’s mounted secrets, and often the cloud instance metadata service, which yields IAM credentials for the wider account. Pod Security Admission, introduced as the replacement for PodSecurityPolicy in Kubernetes 1.25, exists to block exactly this, but many clusters still run it in privileged mode.
Manual review of YAML does not scale past a handful of namespaces. Useful tooling includes kubectl auth can-i --list as the starting point for any identity you hold, kubectl-who-can for the reverse question, KubiScan and rbac-police for automated risky-permission detection, and Peirates for chaining the results during an engagement. BloodHound-style graph analysis has also been adapted to Kubernetes, which is the right mental model: RBAC is a graph of identities and permissions, and escalation is a path through it.
automountServiceAccountToken: false by default and mount tokens only where a workload genuinely calls the API.edit and admin ClusterRoles before binding them, since both include pod creation.escalate, bind, and impersonate for controllers only, and alert on any new binding that includes them.restricted level, with a policy engine such as Kyverno or OPA Gatekeeper for the rules it does not cover.create on serviceaccounts/token, exec into pods, and new ClusterRoleBindings.Our Cloud Security Services include authenticated cluster assessments that start from a single pod token and map exactly how far it reaches.
Because a pod specification names the service account it runs as, and the kubelet mounts that account’s token into the container. Anyone who can create a pod in a namespace can therefore run a container as the most privileged service account available there and read its credentials from inside. The permission looks like a workload capability but behaves as an identity capability.
Yes, unless you turn it off. Kubernetes mounts a projected token for the namespace default service account into every pod that does not specify otherwise. Setting automountServiceAccountToken to false on the service account or on the pod specification prevents it, and doing so by default removes the easiest first step in almost every cluster attack path.
Start with kubectl auth can-i –list for each service account you care about, then use a purpose-built scanner such as rbac-police or KubiScan to find risky verbs across all namespaces. Review every ClusterRoleBinding by hand, since there are usually few of them, and treat any binding granting escalate, bind, impersonate, or wildcard verbs as a finding until proven necessary.
No. RBAC controls what the API will do for an identity, but it says nothing about what a container can do to its host. Without Pod Security Admission, NetworkPolicies, and restrictions on host mounts and privileged containers, an attacker can bypass the API entirely by escaping to the node. The two layers need to be configured together to be meaningful.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.