Skip to main content
Challenges Kubernetes RBAC: privilege path from Pod to Secret
Misc Hard Analyzing the Kubernetes RBAC graph (Role, ClusterRole, RoleBinding, automountServiceAccountToken) Solves: 3

Kubernetes RBAC: privilege path from Pod to Secret

Author: CyberSamSU
Points
100

During a cluster security audit, a remote code execution (RCE) vulnerability was discovered in the web-gateway Pod in the web-dmz namespace exposed to the public internet. You are given cluster_rbac_dump.yaml, a kubectl get ... -A -o yaml-style export of all ServiceAccount, Pod, Role, ClusterRole, RoleBinding, ClusterRoleBinding, and Secret objects across the cluster.

There are many Secrets in the cluster, and each of them has a base64-encoded data.vault_token field. Starting from the web-gateway Pod, determine which single Secret the attacker can reach through the following valid Kubernetes RBAC transitions:

  1. pods/exec (create or *): executing a command inside a Pod in an authorized namespace to obtain its mounted ServiceAccount token — only if a token is mounted in the Pod (if automountServiceAccountToken: false is set on the Pod spec or ServiceAccount, no token is mounted);
  2. serviceaccounts/token (create or *): creating a token for a ServiceAccount in an authorized namespace (and with that exact name if resourceNames is specified);
  3. serviceaccounts (impersonate or *): sending a request on behalf of another ServiceAccount;
  4. Goal: the reached ServiceAccount has get, list, or * permission on the secrets resource (the core "" or "*" must be in apiGroups; resourceNames only grants access to the specified names and is not suitable for list).

Remember: even if a RoleBinding references a ClusterRole, it grants permissions only within its own namespace; a ClusterRoleBinding is required for cluster-wide scope. Decode the vault_token value of the single reachable Secret from base64. Flag format: BAYROQ{...} (the last 16 characters are lowercase hexadecimal digits).

Attached files
cluster_rbac_dump.yaml Log in to download
Hints 3
Opening a hint reduces the points you get for solving this challenge.
Hint 1 −10 pts Log in
Hint 2 −20 pts Log in
Hint 3 −30 pts Log in
To submit a flag, log in.

First solvers

1. Odam 25.11.2026
2. Mirjaxon Qaxxarov 25.11.2026
3. Asmaa Mottery 27.11.2026