Skip to main content

More Info:

Access to validating or mutating webhook configurations can be used to intercept or alter admission decisions. Restrict this access.

Risk Level

Medium

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. List all ClusterRoles that grant webhook access
    Run on any machine with kubectl access:
    Save the output list of ClusterRole names for review.
  2. Inspect each identified ClusterRole’s permissions
    For each ClusterRole name from step 1:
    Review .rules and note which verbs (get, list, watch, create, update, patch, delete) are allowed on validatingwebhookconfigurations or mutatingwebhookconfigurations.
  3. 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.
  4. 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 (validating vs mutating).
    • 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.
  5. Apply targeted changes to ClusterRoles/ClusterRoleBindings
    For each ClusterRole that needs reduction:
    In the editor, under rules for admissionregistration.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 .roleRef to a less-privileged ClusterRole or remove unneeded subjects; if the binding is not needed at all, delete it:
  6. Re-verify effective access after changes
    Re-run the identification command from step 1:
    For any remaining ClusterRoles, confirm via kubectl get clusterrole <name> -o yaml that only the minimal, justified permissions and bindings remain.
Problem indication: Any non-system or broad-privilege role (e.g., custom app roles) listed here may be over-privileged and must be reviewed.
Problem indication: In the rules: section, look for:
  • apiGroups: ["admissionregistration.k8s.io"]
  • resources: ["validatingwebhookconfigurations"] and/or ["mutatingwebhookconfigurations"]
  • verbs including create, update, patch, delete, or *
Roles that are:
  • bound to many subjects,
  • used by application service accounts,
  • or grant write/delete (create, update, patch, delete, *) are high risk and should be questioned.

Problem indication: Any binding that grants these roles to:
  • generic groups (e.g., system:authenticated, system:unauthenticated),
  • broad human user groups (e.g., devs, admins not specifically for cluster ops),
  • application service accounts in non-system namespaces
suggests webhook configuration access is too widely granted.
Problem indication: Any role in this list must have a clear, justified operational need; otherwise it is a candidate for permissions reduction.
Problem indication: Large numbers of webhook configs, or unfamiliar names owned by third parties, warrant closer scrutiny of who manages them using steps 1–4.