More Info:
Access to validating or mutating webhook configuration objects can be abused to intercept or alter admission decisions. Restrict this access to trusted administrators only.Risk Level
HighAddress
SecurityCompliance Standards
- CIS EKS
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
List all cluster roles and role bindings that reference webhook configuration resources
- Run on: any machine with kubectl access
Focus on rules where.resourcesincludesvalidatingwebhookconfigurationsormutatingwebhookconfigurations. -
Identify subjects (users, groups, service accounts) with access to these resources
- Run on: any machine with kubectl access
For each ClusterRole or Role found in step 1, get the full object and its bindings:
List all.subjectsand categorize them as trusted administrators or non-admin workloads. - Run on: any machine with kubectl access
-
Decide which access is justified and which should be removed or constrained
- Review each subject that has
get,list,watch,create,update,patch, ordeleteon the webhook configuration resources. - Treat write access (
create/update/patch/delete) as highly sensitive; normally, only a very small admin group should retain this. - For non-admin service accounts or broad groups (e.g., system:authenticated), plan to remove webhook configuration permissions or replace them with narrower roles that do not include these resources.
- Review each subject that has
-
Remove or restrict webhook configuration access from inappropriate roles
- Run on: any machine with kubectl access
Edit each role/clusterrole that should no longer grant access:
In the opened editor, either:- Remove
validatingwebhookconfigurationsandmutatingwebhookconfigurationsfrom theresourceslist, or - Delete the entire rule block that references them, if it is not needed.
Save and exit to apply changes.
- Run on: any machine with kubectl access
-
If necessary, rebind subjects to safer roles
- Run on: any machine with kubectl access
For workloads that legitimately needed some permissions but not webhook configuration access, bind them to an alternative role without those resources:
Then remove the old binding: - Run on: any machine with kubectl access
-
Verify that only trusted administrators retain webhook configuration access
- Run on: any machine with kubectl access
Re-run a focused RBAC review:
For each remaining role, confirm via its bindings that only trusted admin users/groups/service accounts are subjects. If any non-admin subjects remain, repeat steps 4–5. - Run on: any machine with kubectl access
Using kubectl
Using kubectl
Rules that include:
apiGroups: ["admissionregistration.k8s.io"]resources: ["validatingwebhookconfigurations"]and/or["mutatingwebhookconfigurations"]verbssuch ascreate,update,patch,delete, orlist/get/watchbeyond what trusted admins require.
Bindings where the
subjects include:- Broad groups (e.g.,
system:authenticated,system:serviceaccounts,system:serviceaccounts:<namespace>) - Application service accounts or CI/CD identities
- External user groups not intended as cluster administrators
subjects that are not clearly limited to a small, trusted admin group or break-glass admin accounts.Any Role/RoleBinding that grants access to webhook configuration resources to non-admin service accounts or broad groups.
Only a very small, clearly administrative set of ClusterRoles (and corresponding bindings) remain with access to
validatingwebhookconfigurations and mutatingwebhookconfigurations.Automation
Automation
- Roles/ClusterRoles with
verbsincludingcreate,update,patch,delete, or*onvalidatingwebhookconfigurationsormutatingwebhookconfigurations. - Bindings where:
subjectsinclude broad groups likesystem:authenticated,system:unauthenticated, or generic team groups.- Application/service-specific
ServiceAccountsubjects appear, rather than trusted admin identities. These require manual review and possible RBAC tightening; they cannot be safely auto-fixed.

