Skip to main content

More Info:

If kube-proxy is running, and if it is using a file-based kubeconfig file, ensure that the proxy kubeconfig file has permissions of 644 or more restrictive.

Risk Level

Medium

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. On every worker node, identify the kube-proxy kubeconfig file actually in use (if kube-proxy is a static pod, this will typically be referenced in its manifest):
    If your environment specifies /var/lib/kube-proxy/config.conf, proceed with that path.
  2. On every worker node, review current ownership and permissions of the kube-proxy kubeconfig:
  3. On every worker node, decide whether it is acceptable for all local users to have read access to this file (since mode 644 allows group/other read). If this node hosts untrusted local users or processes, you may choose a more restrictive mode such as 640 or 600 instead of 644.
  4. On every worker node, set permissions on the kube-proxy kubeconfig file to 644 or more restrictive (adjust the mode if you decided on stricter permissions in step 3):
  5. (Optional hardening) On every worker node, ensure the file is owned by root (or the service account user running kube-proxy, if different in your environment):
  6. On every worker node, verify the permissions are now 644 or more restrictive:
    Confirm the reported permissions are 644, 640, 600, or another value numerically less permissive than 644.
kubectl cannot modify file permissions on worker nodes, so it cannot be used to fix this finding on /var/lib/kube-proxy/config.conf. To remediate, you must adjust the file permissions directly on each worker node’s filesystem; follow the guidance in the Manual Steps section.

Additional Reading: