Skip to main content

More Info:

Access to the node proxy sub-resource allows direct interaction with the kubelet API, bypassing normal controls. Restrict it.

Risk Level

Medium

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. Identify ClusterRoles granting node/proxy access
    • Run on: any machine with kubectl access
    • Command:
    • Save the resulting ClusterRole names for review.
  2. Review detailed rules on those ClusterRoles
    • For each ClusterRole name found in step 1, inspect its full spec:
    • Confirm which rules entries reference resources: ["nodes/proxy"] (or include it among multiple resources) and what verbs are allowed. Determine whether each use is strictly required (for example, by an infrastructure component that legitimately needs nodes/proxy).
  3. Map ClusterRoles to subjects using them
    • Run:
    • For each ClusterRole from step 1, list the bindings and subjects (users, groups, service accounts) that receive it:
    • Decide, per subject, whether they truly require node proxy access.
  4. Remove unnecessary nodes/proxy permissions from ClusterRoles
    • For any ClusterRole where nodes/proxy access is not justified, edit it to drop that resource from the rules (or restrict verbs to only what is essential; ideally remove it entirely):
    • In your editor, remove nodes/proxy from resources: lists, or delete the entire rules entry if that is its only resource. Save and exit to apply.
    • If some subjects only need a subset of permissions, consider:
      • Creating a new, more restrictive ClusterRole without nodes/proxy.
      • Rebinding those subjects to the new role with kubectl edit clusterrolebinding <BINDING_NAME>.
  5. Verify no unintended nodes/proxy access remains
    • Re-run the discovery query:
    • Confirm that only explicitly justified ClusterRoles (if any) appear, and that you have a documented rationale for each.
  6. Optionally test from a non-privileged subject
    • Using a user or service account that should not have node proxy access, attempt a proxy call and confirm it is forbidden:
    • Ensure the response indicates lack of authorization (e.g., “forbidden”) for all subjects that are not explicitly approved to use the node proxy sub-resource.
Problem indication: Any ClusterRole name listed here is potentially problematic and must be manually reviewed.
What to look for as a problem:In the rules section, find entries where resources includes nodes/proxy. For example:
Risk indicators (subject to human judgment):
  • resources includes nodes/proxy with broad verbs (e.g., *, proxy, create, update, delete).
  • ClusterRole is bound to many subjects or to wide scopes (e.g., groups like system:authenticated).

Problem indication:
  • Bindings where subjects include:
    • Broad groups (e.g., system:authenticated, system:unauthenticated).
    • ServiceAccounts in many namespaces.
    • Human users who do not need direct kubelet access.
These combinations suggest access to nodes/proxy is too wide and should be reconsidered.
Again, inspect each with:
Problem indication: Same as for ClusterRoles—nodes/proxy plus broad subjects or unnecessary use cases.
After you complete your review and any manual adjustments, re-run the initial listing:
If no ClusterRoles remain (or only tightly scoped, justified ones), the risk from nodes/proxy access has been minimized per your policy.
How to interpret the output
  • Any ClusterRole or Role whose rules include:
    • resources: ["nodes/proxy"] with any verbs, or
    • resources: ["nodes"] (or including nodes) with verbs containing "proxy", is a potential problem and should be reviewed.
  • For each such role:
    • Check the bindings sections to see which users, groups, or service accounts (Subjects) are granted this access.
    • Access is overly broad if:
      • The role is bound to generic groups (e.g. system:authenticated, system:masters, large user groups), or
      • The role’s permissions are not strictly required for a narrowly scoped, documented use case (such as specific node debugging workflows).