Impact & Risk Analysis
- Severity: Critical
- CIS Benchmark: CIS 5.1.1
- Impact: Full Cluster Compromise. The
cluster-adminrole grants super-user access to perform any action on any resource in the cluster. If a user or service account with this role is compromised, the attacker has complete control over the entire Kubernetes environment, including all secrets, nodes, and workloads.
Common Misconfiguration
Assigningcluster-admin to developers, CI/CD pipelines, or third-party tools (like monitoring agents) “just to make it work.” This violates the principle of least privilege.
Vulnerable Example
Secure Example
Audit Procedure
Obtain a list of the principals who have access to thecluster-admin role by reviewing the ClusterRoleBinding output:
- Result: Look for any binding where the
ROLEcolumn iscluster-admin. - Analyze: Review the
SUBJECTcolumn. - Pass: If the subjects are only
system:mastersor critical system components (often starting withsystem:). - Fail: If the list includes individual users, developers, or generic service accounts that do not require full control.
Remediation
Identify allClusterRoleBindings to the cluster-admin role that are not required.
- Check if the user/service account actually needs full control.
- If not, create a custom Role/ClusterRole with fewer privileges or use a default role like
vieworedit. - Remove the excessive binding:
system: prefix (e.g., system:controller:cluster-role-binding) as these are required for the operation of system components.
