Kubernetes RBAC Misconfiguration
O que é 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.
● Exemplos
- 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.
● Perguntas frequentes
O que é 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. Pertence à categoria Segurança em nuvem da cibersegurança.
O que 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.
Como 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.
Como se defender contra Kubernetes RBAC Misconfiguration?
As defesas contra Kubernetes RBAC Misconfiguration costumam combinar controles técnicos e práticas operacionais, conforme detalhado na definição acima.
Quais são outros nomes para Kubernetes RBAC Misconfiguration?
Nomes alternativos comuns: K8s RBAC misuse, Overprivileged ServiceAccount.
● Termos relacionados
- cloud-security№ 671
Segurança do Kubernetes
Proteção de um cluster Kubernetes — API server, plano de controlo, nós, workloads e rede — contra configurações incorretas, comprometimento e movimentação lateral.
- cloud-security№ 668
Ataque a cluster Kubernetes
Intrusao contra um cluster Kubernetes (K8s) que abusa de APIs expostas, RBAC fraco ou cargas vulneraveis para controlar o plano de controlo ou os nos de trabalho.
- identity-access№ 955
Princípio do menor privilégio
Princípio de segurança que concede a cada utilizador, processo ou serviço apenas os privilégios estritamente necessários para desempenhar a sua função.
- cloud-security№ 1124
Token de ServiceAccount (Kubernetes)
Credencial JWT montada num pod Kubernetes que autentica o workload junto do API server e de outros servicos que confiam no fornecedor de identidade do cluster.
- cloud-security№ 849
OPA Gatekeeper
OPA Gatekeeper e um controlador de politicas da CNCF que usa o Open Policy Agent e a linguagem Rego para aplicar politicas de admissao e auditoria a recursos do Kubernetes.
- cloud-security№ 673
Kyverno
O Kyverno e um motor de politicas Kubernetes da CNCF que valida, muta e gera recursos a partir de politicas escritas em YAML nativo, em vez de uma nova DSL.