Overview

FieldValue
ID1031
NameEscalate privileges via ClusterRoles (escalate verb)
Risk CategoryElevation of Privilege
Risk LevelCritical
Role TypeClusterRole
API Groupsrbac.authorization.k8s.io
Resourcesclusterroles
Risky Verb Combinations[escalate]
TagsClusterAdminAccess PrivilegeEscalation RBACManipulation

Description

Permits using the ’escalate’ verb on ClusterRoles (or Roles). This allows a user to create or update a role with more permissions than they currently possess, up to the permissions defined in the role they are escalating, leading to direct privilege escalation.

Abuse Scenarios

  1. Create a new ClusterRole with elevated permissions (e.g., ‘create pods’) that the current user doesn’t directly have, leveraging the ’escalate’ permission.
# This command will succeed if the user has 'escalate' on 'clusterroles',
# even if they don't have 'create pods' directly.
kubectl create -f - <<EOF
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: elevated-pod-creator
rules:
- apiGroups: [""]
  resources: ["pods"]
  verbs: ["create"]
EOF
# Example: kubectl create -f - <<EOF ... EOF