A misconfiguration in Google Kubernetes Engine (GKE) could allow attackers to take over Kubernetes clusters and access sensitive information, according to a warning from cloud security startup Orca Security.
The issue is related to the privileges granted to users in the system:authenticated group, which includes all users with a Google account, although it could be mistakenly believed to include only verified identities.
“This misunderstanding creates a significant security loophole when administrators unknowingly bind this group with overly permissive roles,” Orca said in a research report.
A managed Kubernetes service, GKE supports cluster authentication and authorization, and, with Google being the identity provider, anyone with a Google account can authenticate against the Kubernetes API server.
This also means that, when it comes to Kubernetes built-in groups, such as system:anonymous, system:authenticated, and system:unauthenticated, authorization misconfigurations can occur, and the one Orca discovered could have dire consequences.
Specifically, the security firm discovered that an attacker could an access token via the OAuth 2.0 Playground and become part of the system:authenticated group, which would provide them at least with access to discovery APIs.
However, if authenticated users are authorized with extended roles, the attacker’s level of access would be far greater, allowing them to perform reconnaissance, take over the Kubernetes cluster, cause denial of service, or access sensitive information.
Orca said discovered more than 250,000 GKE clusters exposed to the internet, with about 1,300 potentially vulnerable to this misconfiguration. Of these, more than 100 could be immediately compromised, the company cautioned.
For some of the identified instances, cluster admin permissions had been granted to the system:authenticated group, providing an attacker with the ability to query multiple resources.
GKE clusters impacted by this seemingly innocuous misconfiguration were found to expose AWS credentials, GCP API keys, service account authentication JSON files, private keys, credentials for container registries, and access to critical resources such as Grafana, RabbitMQ, and ElasticSearch.
Orca reported the findings to Google, which has taken steps to mitigate the risks in GKE version 1.28, by preventing the binding of admin roles to Kubernetes built-in groups, by building configurable prevention rules, by restricting network access, and by notifying GKE users with bindings to these groups to review configurations.
“Clusters that apply authorized networks restrictions have a first layer of defense: they cannot be attacked directly from the Internet. But we still recommend removing these bindings for defense in depth and to guard against errors in network controls,” Google said in a separate security bulletin.
“We created our Vulnerability Rewards Program specifically to identify security events with potential customer impact. We appreciate Orca Security and the broader security community’s ongoing participation in these programs. We value the work of the researchers and have issued a security bulletin for the limited number of impacted GKE users detailing the steps they should take to protect themselves from any accidental authorization,” a Google spokesperson said in an emailed statement.
*Updated with statement from Google.
Related: Flaws in Google Kubernetes Engine Allows Cluster Takeover
Related: Researchers Find Dangerous Exposure of Sensitive Kubernetes Secrets
Related: Attackers Abuse Kubernetes RBAC to Deploy Persistent Backdoor