More Info:
Access to validating or mutating webhook configurations can be used to intercept or alter admission decisions. Restrict this access.Risk Level
MediumAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
List all ClusterRoles that grant webhook access
Run on any machine with kubectl access:Save the output list of ClusterRole names for review. -
Inspect each identified ClusterRole’s permissions
For each ClusterRole name from step 1:Review.rulesand note which verbs (get,list,watch,create,update,patch,delete) are allowed onvalidatingwebhookconfigurationsormutatingwebhookconfigurations. -
Determine which subjects receive these ClusterRoles
For each ClusterRole name from step 1, find ClusterRoleBindings:For each returned ClusterRoleBinding:Review.subjects(users, groups, service accounts) and confirm which ones truly need webhook configuration access. -
Decide least-privilege adjustments
For each ClusterRole and its bindings:- Confirm whether any subject actually needs to read or modify webhook configurations (e.g., admission controller operators).
- If only read is required, plan to remove
create,update,patch,delete. - If only specific webhook type is required, plan to remove access to the other (
validatingvsmutating). - If a subject does not need any webhook access, plan to:
- Rebind it to a different, less-privileged ClusterRole, or
- Remove the ClusterRoleBinding if not needed.
-
Apply targeted changes to ClusterRoles/ClusterRoleBindings
For each ClusterRole that needs reduction:In the editor, underrulesforadmissionregistration.k8s.io, remove unnecessary verbs and/or resources, following your decisions from step 4, then save.
For each ClusterRoleBinding that should no longer grant webhook access:Adjust.roleRefto a less-privileged ClusterRole or remove unneeded subjects; if the binding is not needed at all, delete it: -
Re-verify effective access after changes
Re-run the identification command from step 1:For any remaining ClusterRoles, confirm viakubectl get clusterrole <name> -o yamlthat only the minimal, justified permissions and bindings remain.
Using kubectl
Using kubectl
rules: section, look for:apiGroups: ["admissionregistration.k8s.io"]resources: ["validatingwebhookconfigurations"]and/or["mutatingwebhookconfigurations"]verbsincludingcreate,update,patch,delete, or*
- bound to many subjects,
- used by application service accounts,
- or grant write/delete (
create,update,patch,delete,*) are high risk and should be questioned.
- generic groups (e.g.,
system:authenticated,system:unauthenticated), - broad human user groups (e.g.,
devs,adminsnot specifically for cluster ops), - application service accounts in non-system namespaces
Automation
Automation

