10 Most Common Kubernetes Vulnerabilities

The 10 most common Kubernetes vulnerabilities mapped to OWASP K8s Top 10, with read-only checks to audit your cluster and fixes for each.

Dec 25, 2025 - 15:31
Nov 6, 2026 - 19:37
 0  77
10 Most Common Kubernetes Vulnerabilities

The most common Kubernetes vulnerabilities are configuration weaknesses rather than exotic exploits: over-permissive RBAC, privileged or root containers, exposed API servers and kubelets, unencrypted or over-shared Secrets, missing network policies, vulnerable images, weak admission control, outdated cluster versions, poor audit logging and insecure dashboards. Most can be found with read-only checks and fixed with policy.

This guide is written for defenders. For each weakness it explains the risk, how to check your own cluster for it with read-only commands, and how to fix and monitor it. It follows the categories of the OWASP Kubernetes Top 10 project. Where our Kubernetes security best practices post tells you what to build, this one is an audit checklist for a cluster that already exists. Only test clusters you are authorised to assess.

Key takeaways

  • Misconfiguration causes more Kubernetes exposure than software bugs. Audit configuration first.
  • kubectl auth can-i --list, kube-bench and Pod Security Admission warnings give a fast first picture with no extra infrastructure.
  • Kubernetes Secrets are base64-encoded, not encrypted, unless you configure encryption at rest.
  • Pods can talk to every other pod by default. Network policies only work if your CNI plugin enforces them.
  • PodSecurityPolicy was removed in Kubernetes 1.25. Use Pod Security Admission or a policy engine such as Kyverno or OPA Gatekeeper.
  • Each Kubernetes minor version gets about 14 months of upstream patch support. Running unsupported versions means missing security fixes.

The 10 vulnerabilities at a glance

#VulnerabilityOWASP K8s categoryFirst check
1Over-permissive RBACOverly permissive RBACkubectl auth can-i --list
2Privileged and root containersInsecure workload configurationsPod Security Admission warn mode
3Exposed API serverBroken authenticationEndpoint and anonymous auth settings
4Insecure kubelet and cluster componentsMisconfigured cluster componentskube-bench
5Weak Secrets handlingSecrets management failuresEncryption config, RBAC on secrets
6No network segmentationMissing network segmentation controlsList NetworkPolicies per namespace
7Vulnerable and untrusted imagesSupply chain vulnerabilitiesImage scan, registry allowlist
8No central policy enforcementLack of centralised policy enforcementCheck admission controllers and policies
9Weak logging and auditInadequate logging and monitoringAudit policy present and shipped
10Outdated Kubernetes and add-onsOutdated and vulnerable componentskubectl version vs supported releases

1. Over-permissive RBAC

Risk: RBAC controls who can do what through the API. Bindings to cluster-admin, wildcard verbs or resources ("*"), and broad rights such as create pods, escalate, bind, impersonate or reading Secrets let a compromised account or pod take over far more than intended. Service account tokens mounted into every pod make this worse.

Check (read only):

kubectl get clusterrolebindings -o wide | grep cluster-admin
kubectl auth can-i --list --as=system:serviceaccount:payments:default -n payments
kubectl get clusterroles -o json | grep -n '"\*"'

Fix and monitor: grant namespaced Roles instead of ClusterRoles where possible, give each workload its own service account, set automountServiceAccountToken: false for pods that do not call the API, and review bindings regularly. The RBAC good practices page lists the permissions that allow privilege escalation.

2. Privileged and root containers

Risk: A container with privileged: true, host namespaces (hostPID, hostNetwork), hostPath mounts or added Linux capabilities is close to having root on the node. A flaw in that application can become a node compromise and, from there, access to other pods.

Check: label a namespace with Pod Security Admission in warn and audit mode. Existing violations are reported without blocking anything:

kubectl label --dry-run=server --overwrite ns payments \
  pod-security.kubernetes.io/enforce=restricted

The server-side dry run prints warnings for every running pod that would violate the restricted profile.

Fix: set a security context on workloads and then enforce a profile:

securityContext:
  runAsNonRoot: true
  allowPrivilegeEscalation: false
  readOnlyRootFilesystem: true
  capabilities:
    drop: ["ALL"]
  seccompProfile:
    type: RuntimeDefault

3. Exposed API server

Risk: An API server reachable from the internet is a constant target for credential stuffing and for exploiting any future vulnerability. Anonymous access, static token files and long-lived client certificates that cannot be revoked add to the risk.

Check: on managed services, review whether the endpoint is public and which CIDRs may reach it (for example the EKS endpoint access settings, AKS authorised IP ranges or GKE authorised networks). On self-managed clusters, inspect API server flags such as --anonymous-auth and confirm what the system:anonymous user and system:unauthenticated group are bound to.

Fix: make the endpoint private or restrict it to known networks, use OIDC or the cloud provider's identity integration for users, and remove any RBAC bindings to anonymous users.

4. Insecure kubelet and cluster components

Risk: The kubelet API on each node can run commands in pods. If anonymous authentication is enabled or authorization is set to AlwaysAllow, anyone who reaches the port can control workloads on that node. Exposed etcd, which stores all cluster state including Secrets, is even more serious.

Check: run kube-bench, which tests nodes and control plane settings against the CIS Kubernetes Benchmark. Managed services have their own benchmark variants because you cannot change control plane settings.

Fix: in the kubelet configuration set authentication.anonymous.enabled: false and authorization.mode: Webhook, restrict etcd to the control plane with mutual TLS, and block node ports at the network level.

5. Weak Secrets handling

Risk: Secret values are base64-encoded in the API, which anyone can decode. Without encryption at rest they sit in etcd in plain form. Broad get or list rights on Secrets, Secrets committed to Git and Secrets exposed as environment variables (which can leak into logs and crash dumps) are common findings.

Check:

kubectl auth can-i list secrets --all-namespaces --as=system:serviceaccount:ci:deployer
kubectl get clusterroles,roles -A -o json | grep -n '"secrets"'

On self-managed clusters, confirm the API server has --encryption-provider-config pointing to an EncryptionConfiguration, ideally with a KMS provider. On managed services, confirm envelope encryption with a cloud KMS key is enabled.

Fix: encrypt at rest, restrict who can read Secrets, mount them as files rather than environment variables where possible, and consider an external manager with the Secrets Store CSI Driver or External Secrets Operator. Our comparison of tools to manage Kubernetes Secrets covers the options.

6. No network segmentation

Risk: By default any pod can connect to any other pod and to the cloud metadata endpoint. One compromised pod can then probe databases, internal APIs and node metadata credentials.

Check:

kubectl get networkpolicies -A
# namespaces that have no policy at all
for ns in $(kubectl get ns -o jsonpath='{.items[*].metadata.name}'); do
  [ -z "$(kubectl get netpol -n "$ns" -o name)" ] && echo "no policy: $ns"
done

Also confirm your CNI plugin enforces NetworkPolicy. Calico and Cilium do; some basic plugins accept the objects but ignore them.

Fix: apply a default-deny policy per namespace, then allow only required flows, and block egress to the metadata IP for pods that do not need it. Ready-to-use examples are in Kubernetes network policies every engineer must know.

7. Vulnerable and untrusted images

Risk: Images bring their own OS packages and libraries, many with known CVEs. Pulling from any public registry, using mutable latest tags and skipping signature checks let vulnerable or tampered images reach production.

Check: list what is actually running and scan it:

kubectl get pods -A -o jsonpath='{range .items[*]}{.spec.containers[*].image}{"\n"}{end}' | sort -u
trivy image registry.example.com/web:1.4.2

Fix: scan in CI and in the registry, pin images by digest or immutable tag, restrict allowed registries by admission policy, and verify signatures (for example Sigstore cosign with a policy engine). Our image scanning tools guide compares scanners.

8. No central policy enforcement

Risk: Without admission control, every rule in sections 2, 5, 6 and 7 depends on each team remembering it. One manifest without limits or with a privileged flag is enough.

Check: confirm Pod Security Admission labels on namespaces and whether a policy engine is installed:

kubectl get ns -L pod-security.kubernetes.io/enforce
kubectl get validatingwebhookconfigurations,validatingadmissionpolicies

Fix: enforce Pod Security Standards with built-in admission, and add Kyverno, OPA Gatekeeper or ValidatingAdmissionPolicy (CEL-based, generally available since Kubernetes 1.30) for rules such as allowed registries, required labels and resource limits. Roll out in audit mode first, then enforce. The same policies can run in CI so developers see failures before deploy.

9. Weak logging and audit

Risk: If API audit logs are off or kept only on the node, you cannot answer basic questions after an incident: who read that Secret, who created that pod, which token was used.

Check: self-managed clusters need --audit-policy-file and a log backend on the API server. Managed services require you to enable control plane audit logs (for example EKS control plane logging). Confirm logs reach a central store with retention.

Fix: enable audit logging at Metadata level broadly and RequestResponse for sensitive resources, ship logs centrally, and alert on events such as exec into pods, new ClusterRoleBindings and Secret reads by unusual identities. Runtime detection with Falco adds visibility into what containers do. See hidden Kubernetes logs you should check.

10. Outdated Kubernetes and add-ons

Risk: The Kubernetes project maintains release branches for the three most recent minor versions, each with roughly 14 months of patch support. Older clusters stop receiving fixes. Ingress controllers, CNI plugins, CSI drivers and Helm-installed add-ons have their own CVEs and are often forgotten.

Check:

kubectl version
kubectl get nodes -o wide          # kubelet versions per node
helm list -A                       # add-on chart versions

Compare against the supported releases page and your provider's version calendar, and subscribe to the Kubernetes security announcements.

Fix: plan minor upgrades on a regular schedule, patch add-ons with the cluster, and test upgrades in a non-production cluster first. Our node maintenance tips cover safe draining during upgrades.

A 30-minute audit routine

StepTool or commandFinds
1kubectl version, helm list -AUnsupported versions (10)
2kube-benchComponent misconfiguration (3, 4)
3Server-side dry run of PSA labelsPrivileged workloads (2)
4kubectl auth can-i --list per service accountRBAC excess (1, 5)
5NetworkPolicy loopUnsegmented namespaces (6)
6Image list plus scannerVulnerable images (7)
7Webhook and policy listing; audit log checkMissing enforcement and logging (8, 9)

How to prioritise what you find

A first audit usually returns a long list. Rank findings by how reachable the weakness is and how much access it would give an attacker, then fix in that order.

PriorityTypical findingsWhy first
Fix nowPublic API server with weak authentication, anonymous kubelet access, exposed dashboards, unexpected cluster-admin bindingsReachable from outside or grant full cluster control
This sprintPrivileged pods, hostPath mounts, broad Secret read rights, no encryption at rest, unsupported Kubernetes versionOne compromised pod or account can escalate to node or cluster level
Planned workMissing network policies, no admission policies, images from any registry, partial audit loggingLimit blast radius and detection; need rollout in audit mode first
OngoingMedium CVEs in images, missing labels, resource limitsHandled continuously through CI checks and patching

Record findings with an owner and a date, fix the highest-impact items first (usually RBAC, privileged pods and exposed endpoints), and re-run the routine after each change. Shared clusters need extra isolation, covered in multi-tenant security practices, and a hardening sequence is in Kubernetes cluster hardening steps. For structured, exam-aligned practice on all of these controls, see our CKS training, offered in Kharadi, Pune and live online.

Frequently asked questions

What is the most common Kubernetes security issue?

Misconfiguration, especially over-permissive RBAC and workloads running privileged or as root. These are more common than vulnerabilities in Kubernetes code itself and can be found with read-only checks.

Are Kubernetes Secrets encrypted?

Not by default. Values are base64-encoded in the API and stored unencrypted in etcd unless you configure encryption at rest, ideally with a KMS provider. Restrict read access with RBAC as well.

What replaced PodSecurityPolicy?

PodSecurityPolicy was removed in Kubernetes 1.25. Pod Security Admission enforces the built-in privileged, baseline and restricted profiles per namespace, and policy engines such as Kyverno or OPA Gatekeeper handle custom rules.

How do I scan a Kubernetes cluster for vulnerabilities?

Use kube-bench for CIS Benchmark checks, an image scanner such as Trivy for running images, Pod Security Admission dry runs for workload settings, and kubectl auth can-i --list to review RBAC.

Do network policies work on every cluster?

Only if the CNI plugin enforces them. Calico and Cilium do. Some simple plugins accept NetworkPolicy objects without enforcing them, so test that a deny rule actually blocks traffic.

How often should I upgrade Kubernetes for security?

Stay on a supported minor version, which means a minor upgrade roughly every few months to a year, and apply patch releases promptly. Each minor version receives about 14 months of upstream patch support.

Is a managed Kubernetes service secure by default?

The provider secures and patches the control plane, but workloads, RBAC, network policies, Secrets and node upgrades remain your responsibility under the shared responsibility model.

References

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Angry Angry 0
Sad Sad 0
Wow Wow 0
Mridul I am a passionate technology enthusiast with a strong focus on DevOps, Cloud Computing, and Cybersecurity. Through my blogs at DevOps Training Institute, I aim to simplify complex concepts and share practical insights for learners and professionals. My goal is to empower readers with knowledge, hands-on tips, and industry best practices to stay ahead in the ever-evolving world of DevOps.