Skip to main content

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

High

Address

Security

Compliance Standards

  • CIS EKS

Triage and Remediation

Remediation

Manual Steps

  1. List all cluster roles and role bindings that reference webhook configuration resources
    • Run on: any machine with kubectl access
    Focus on rules where .resources includes validatingwebhookconfigurations or mutatingwebhookconfigurations.
  2. 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 .subjects and categorize them as trusted administrators or non-admin workloads.
  3. Decide which access is justified and which should be removed or constrained
    • Review each subject that has get, list, watch, create, update, patch, or delete on 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.
  4. 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 validatingwebhookconfigurations and mutatingwebhookconfigurations from the resources list, or
    • Delete the entire rule block that references them, if it is not needed.
      Save and exit to apply changes.
  5. 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:
  6. 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.
Problem indication: Any ClusterRole in this list is capable of accessing/altering webhook configurations. Non-admin or generic roles here (e.g., roles used by apps, CI/CD, or controllers) are suspect.
Problem indication:
Rules that include:
  • apiGroups: ["admissionregistration.k8s.io"]
  • resources: ["validatingwebhookconfigurations"] and/or ["mutatingwebhookconfigurations"]
  • verbs such as create, update, patch, delete, or list/get/watch beyond what trusted admins require.
Problem indication:
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
Problem indication:
subjects that are not clearly limited to a small, trusted admin group or break-glass admin accounts.
Problem indication:
Any Role/RoleBinding that grants access to webhook configuration resources to non-admin service accounts or broad groups.
Desired state:
Only a very small, clearly administrative set of ClusterRoles (and corresponding bindings) remain with access to validatingwebhookconfigurations and mutatingwebhookconfigurations.
Problematic output indicators:
  • Roles/ClusterRoles with verbs including create, update, patch, delete, or * on validatingwebhookconfigurations or mutatingwebhookconfigurations.
  • Bindings where:
    • subjects include broad groups like system:authenticated, system:unauthenticated, or generic team groups.
    • Application/service-specific ServiceAccount subjects appear, rather than trusted admin identities. These require manual review and possible RBAC tightening; they cannot be safely auto-fixed.