More Info:
Access to validating or mutating webhook configurations can be abused to escalate privileges or disrupt cluster operations. It should be limited to trusted administrators only.Risk Level
HighAddress
SecurityCompliance Standards
- CIS AKS
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
List all Roles/ClusterRoles with webhook configuration permissions
Run on: any machine with kubectl access -
Inspect the exact permissions on each identified Role/ClusterRole
Run on: any machine with kubectl access
For each ClusterRole name from step 1:For each namespaced Role from step 1:Reviewrulesfor verbs likecreate,update,patch, ordeleteonvalidatingwebhookconfigurationsormutatingwebhookconfigurations. Flag any Role/ClusterRole not strictly needed for trusted cluster administration. -
Identify who is bound to these Roles/ClusterRoles
Run on: any machine with kubectl access
For each ClusterRole:For each Role:Then inspect each binding to see which users/groups/serviceaccounts have access: -
Decide required vs. unnecessary access
- Classify each subject (user, group, serviceaccount) as:
- Trusted administrator requiring webhook configuration management, or
- Application/operator component needing only read access (if any), or
- Unnecessary recipient of webhook configuration write access.
- For non-admin components that must manage their own webhooks, prefer narrowly scoped Roles limited to their specific webhooks rather than broad cluster-wide permissions.
- Classify each subject (user, group, serviceaccount) as:
-
Adjust RBAC to remove or narrow write access
Run on: any machine with kubectl access
a) To remove an unnecessary binding entirely:b) To narrow a Role/ClusterRole (e.g., drop write verbs or webhook resources), edit it:In the editor, removecreate,update,patch,deleteverbs or removevalidatingwebhookconfigurations/mutatingwebhookconfigurationsfromresourcesfor any non-admin use. Save to apply. -
Verify resulting access is limited to trusted administrators
Run on: any machine with kubectl access
Re-run the discovery and manually confirm bindings:For the remaining Roles/ClusterRoles, confirm via their RoleBindings/ClusterRoleBindings that only trusted administrator identities retain write access to webhook configuration objects.
Using kubectl
Using kubectl
- Output is a list of
ClusterRolenames. - Potential problems:
- Generic or broad roles like
cluster-admin(expected but high‑risk) and any custom roles with non-admin names (e.g.dev-team,ci-runner,viewer-plus) that appear here. - Any role clearly intended for application workloads, CI/CD, or non-ops users.
- Generic or broad roles like
- Problematic if:
resourcesincludesvalidatingwebhookconfigurationsandverbsincludes powerful verbs (create,update,patch,delete,deletecollection, or*).apiGroupsisadmissionregistration.k8s.iowith broad wildcard usage:resources: ["*"]orverbs: ["*"].
- Acceptable only for tightly controlled admin/cluster-operations roles.
- In most clusters, this should return no results.
- Any Role here is suspicious, especially in application namespaces (e.g.
default,dev,staging,prod).
- Same criteria as validating webhooks: strong verbs on
mutatingwebhookconfigurationsor wildcard rules inadmissionregistration.k8s.io.
- Again, expected result is usually no Roles.
- Any Role in non-admin namespaces indicates a likely problem.
- Problematic if:
- ServiceAccounts used by apps/CI/CD pipelines are bound.
- End-user groups (e.g.
devs,qa,viewers) are bound.
- Prefer only tightly controlled admin groups or ops service accounts.
- Any non-admin users or application service accounts bound to these Roles are likely misconfigured.
Interpreting problems overall
- A finding exists when:
- Any non-admin or broad/shared roles provide
create,update,patch,delete,deletecollection, or*on:validatingwebhookconfigurationsmutatingwebhookconfigurations
- And those roles are bound to:
- Application/CI service accounts,
- General developer/QA/user groups,
- Or any subjects beyond a small, trusted administrative set.
- Any non-admin or broad/shared roles provide
Automation
Automation
- Any Role/ClusterRole listed with:
RESOURCESincludingvalidatingwebhookconfigurationsormutatingwebhookconfigurations, andVERBSincludingcreate,update,patch, ordelete
- Especially problematic if the associated (Cluster)RoleBindings show:
system:authenticated,system:serviceaccounts, or broad groups rather than a small set of named admin users/groups.
- Acceptable patterns typically:
- Are limited to a small, clearly-admin ClusterRole (e.g.
cluster-adminin some environments) bound only to a trusted admin group, or - Are used by tightly-controlled CI/CD or operator service accounts with a justified need.
- Are limited to a small, clearly-admin ClusterRole (e.g.

