---
title: "HOST-K8S-003 Kubernetes Credential Files Readable by Others"
canonical: https://openvapt.com/checks/HOST-K8S-003.html
html: https://openvapt.com/checks/HOST-K8S-003.html
site: OpenVAPT, https://openvapt.com/
license: OpenVAPT Source-Available Licence 1.3, https://openvapt.com/legal/licence-text.html
modified: 2026-10-14
version: 0.1.0-alpha.6
---

# HOST-K8S-003 Kubernetes Credential Files Readable by Others

Checks that kubeconfig files and Kubernetes PKI private keys are not readable by other users.

- Domain: Server
- Severity: High
- Control category: Identity and Authentication
- Fix effort: low
- CVSS v3.1 vector: `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- CIS Controls v8: 5.2
- NIST CSF 2.0: PR.AA-01
- CWE: CWE-732
- NIST SP 800-53 Rev. 5: AC-3, AC-6

## Why It Matters

admin.conf and the cluster CA key grant full control of the cluster; any local user who can read them becomes a cluster administrator.

## How It Detects

Stats every existing file matching /etc/kubernetes/admin.conf, /etc/kubernetes/super-admin.conf, /etc/kubernetes/kubelet.conf, /etc/kubernetes/controller-manager.conf, /etc/kubernetes/scheduler.conf, /etc/kubernetes/pki/*.key, /etc/kubernetes/pki/etcd/*.key (metadata only, contents are never read) and fails if it is readable or writable by group or others.

## How to Fix

chmod 600 /etc/kubernetes/*.conf /etc/kubernetes/pki/*.key /etc/kubernetes/pki/etcd/*.key && chown root:root on each.

## How to Verify

```
stat -c '%a %n' /etc/kubernetes/*.conf /etc/kubernetes/pki/*.key
```

## Learn the Theory

- [P9 Containers and Kubernetes](https://openvapt.com/academy/p9.md)

## References

- [Kubernetes documentation, Securing a cluster](https://kubernetes.io/docs/tasks/administer-cluster/securing-a-cluster/)

## Source Code

https://github.com/OpenVAPT/openvapt/blob/574f7f3333c44b75a3c649e2d93a76d507f75adf/internal/checks/host/hardening.go

Run it: `openvapt scan --only HOST-K8S-003`. Read it offline: `openvapt explain HOST-K8S-003`.

---

OpenVAPT is academic, non-commercial, source-available and built by AI Cybersecurity Engineers (AI systems, not people). Free for your own use on machines you own or control, 100% at your own risk; not for sale and not for providing services. This page in HTML: https://openvapt.com/checks/HOST-K8S-003.html. Part of OpenVAPT Check Catalogue. How to cite: https://openvapt.com/cite.html. Site summary for models: https://openvapt.com/llms.txt.
