Kubernetes RBAC Misconfiguration
¿Qué es Kubernetes RBAC Misconfiguration?
Kubernetes RBAC MisconfigurationOver-permissive Kubernetes Role/ClusterRole bindings that grant workloads, users, or service accounts cluster-wide powers — verbs on Secrets, pods/exec, impersonate — turning a single compromised container into cluster takeover.
Kubernetes RBAC misconfiguration is consistently in the top three findings of every cluster audit. The common patterns are: binding workloads to cluster-admin or to ClusterRoles with verbs `*` on resources `*`; granting `get`, `list`, or `watch` on `secrets` cluster-wide (which lets a pod read every secret in the cluster); allowing `pods/exec` (which lets the holder shell into any pod, including the API server's static pods on misconfigured clusters); allowing `impersonate` on users, groups, or serviceaccounts (which is full account takeover); and binding the default service account in `kube-system` to admin. The blast radius pattern is consistent: a compromised front-door container with one of these bindings allows an attacker to dump all Secrets (including service-account tokens), exec into other pods, modify webhooks, or impersonate the admin group. Mitigations include automated linting (kubescape, kube-bench, Polaris, Datree), admission policies (Kyverno, OPA Gatekeeper) that reject overpermissive bindings, periodic generation of a least-privilege Role from runtime audit logs (rakkess, audit2rbac), and rolling out Pod Identity / Workload Identity rather than cluster-wide tokens.
● Ejemplos
- 01
A monitoring sidecar is bound to a ClusterRole granting `get` on `secrets` cluster-wide; a compromise of the sidecar lets the attacker dump every Secret in every namespace.
- 02
An admission policy rejects any RoleBinding that references the `cluster-admin` ClusterRole outside of the `kube-system` namespace.
● Preguntas frecuentes
¿Qué es Kubernetes RBAC Misconfiguration?
Over-permissive Kubernetes Role/ClusterRole bindings that grant workloads, users, or service accounts cluster-wide powers — verbs on Secrets, pods/exec, impersonate — turning a single compromised container into cluster takeover. Pertenece a la categoría de Seguridad en la nube en ciberseguridad.
¿Qué significa Kubernetes RBAC Misconfiguration?
Over-permissive Kubernetes Role/ClusterRole bindings that grant workloads, users, or service accounts cluster-wide powers — verbs on Secrets, pods/exec, impersonate — turning a single compromised container into cluster takeover.
¿Cómo funciona Kubernetes RBAC Misconfiguration?
Kubernetes RBAC misconfiguration is consistently in the top three findings of every cluster audit. The common patterns are: binding workloads to cluster-admin or to ClusterRoles with verbs `*` on resources `*`; granting `get`, `list`, or `watch` on `secrets` cluster-wide (which lets a pod read every secret in the cluster); allowing `pods/exec` (which lets the holder shell into any pod, including the API server's static pods on misconfigured clusters); allowing `impersonate` on users, groups, or serviceaccounts (which is full account takeover); and binding the default service account in `kube-system` to admin. The blast radius pattern is consistent: a compromised front-door container with one of these bindings allows an attacker to dump all Secrets (including service-account tokens), exec into other pods, modify webhooks, or impersonate the admin group. Mitigations include automated linting (kubescape, kube-bench, Polaris, Datree), admission policies (Kyverno, OPA Gatekeeper) that reject overpermissive bindings, periodic generation of a least-privilege Role from runtime audit logs (rakkess, audit2rbac), and rolling out Pod Identity / Workload Identity rather than cluster-wide tokens.
¿Cómo defenderse de Kubernetes RBAC Misconfiguration?
Las defensas contra Kubernetes RBAC Misconfiguration combinan habitualmente controles técnicos y prácticas operativas, como se detalla en la definición.
¿Cuáles son otros nombres para Kubernetes RBAC Misconfiguration?
Nombres alternativos comunes: K8s RBAC misuse, Overprivileged ServiceAccount.
● Términos relacionados
- cloud-security№ 671
Seguridad de Kubernetes
Protección de un cluster de Kubernetes —su API server, plano de control, nodos, cargas y red— frente a configuraciones erróneas, compromisos y movimiento lateral.
- cloud-security№ 668
Ataque a cluster de Kubernetes
Intrusion contra un cluster de Kubernetes (K8s) que abusa de APIs expuestas, RBAC debil o cargas vulnerables para hacerse con el control plano o los nodos.
- identity-access№ 955
Principio de mínimo privilegio
Principio de seguridad que otorga a cada usuario, proceso o servicio sólo los privilegios mínimos imprescindibles para cumplir su función.
- cloud-security№ 1124
Token de cuenta de servicio (Kubernetes)
Credencial JWT montada en un pod de Kubernetes que autentica al workload ante el API server y otros servicios que confían en el proveedor de identidad del clúster.
- cloud-security№ 849
OPA Gatekeeper
OPA Gatekeeper es un controlador de politicas de la CNCF que usa Open Policy Agent y el lenguaje Rego para aplicar politicas de admision y auditoria en Kubernetes.
- cloud-security№ 673
Kyverno
Kyverno es un motor de politicas de Kubernetes (CNCF) que valida, muta y genera recursos usando politicas escritas en YAML nativo en lugar de un DSL nuevo.