Overview

FieldValue
ID1032
NameBind ClusterRoles to identities (bind verb)
Risk CategoryElevation of Privilege
Risk LevelCritical
Role TypeClusterRole
API Groupsrbac.authorization.k8s.io
Resourcesclusterroles
Risky Verb Combinations[bind]
TagsBindingToPrivilegedRole ClusterAdminAccess PrivilegeEscalation RBACManipulation

Description

Permits using the ‘bind’ verb on ClusterRoles (or Roles). This allows a user to create a ClusterRoleBinding (or RoleBinding) that grants the permissions of a specific role to another user, group, or service account, potentially leading to privilege escalation if a highly privileged role is bound.

Abuse Scenarios

  1. Create a ClusterRoleBinding to grant ‘cluster-admin’ to a service account, leveraging the ‘bind’ permission on the ‘cluster-admin’ ClusterRole.
# This command will succeed if the user has 'bind' on the 'cluster-admin' ClusterRole.
kubectl create -f - <<EOF
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: bind-to-cluster-admin
subjects:
- kind: ServiceAccount
  name: <serviceaccount-name>
  namespace: <namespace>
roleRef:
  kind: ClusterRole
  name: cluster-admin
  apiGroup: rbac.authorization.k8s.io
EOF
# Example: kubectl create -f - <<EOF ... EOF (bind 'default' SA in 'default' namespace to cluster-admin)