Critical Google Kubernetes Misconfiguration Allows Unrestricted Control by Any Gmail Account on Your Clusters
Cyber security researchers recently unearthed a significant loophole in Google Kubernetes Engine (GKE) that poses a serious threat to as many as 250,000 active GKE clusters. Dubbed Sys:All by cloud security firm Orca, this critical vulnerability could allow threat actors with a Google account to exploit the system:authenticated group, potentially gaining control of a Kubernetes cluster.
Understanding the Sys:All Vulnerability:
Sys:All arises from a widespread misconception surrounding the system:authenticated group in GKE. Contrary to belief, this group includes any Google-authenticated account, not just verified and deterministic identities. This misperception becomes critical when administrators inadvertently grant it overly permissive roles.
The Misconception:
The flaw stems from a widespread misconception surrounding the system:authenticated group in GKE. Contrary to the belief that it includes only verified and deterministic identities, it encompasses any Google-authenticated account, even those outside the organization. This misunderstanding could lead administrators to unintentionally grant overly permissive roles to the system:authenticated group.
Exploitation Method:
Security researcher Ofir Yakobi highlighted that an external threat actor, armed with a Google account, could exploit this misconfiguration using their own Google OAuth 2.0 bearer token. This unauthorized access could then be leveraged for various malicious activities, including lateral movement, cryptomining, denial-of-service attacks, and sensitive data theft.
Consequences:
Compounding the severity of Sys:All is the fact that the exploitation method does not leave a trace that can be linked back to the original Gmail or Google Workspace account that obtained the OAuth bearer token. This creates challenges in identifying and attributing malicious activities.
Potential Impact:
While there is currently no public record of a large-scale attack utilizing this method, cybersecurity experts warn that it could be a matter of time before threat actors capitalize on this vulnerability. Users are strongly encouraged to take proactive measures to secure their cluster access controls.
Mitigation Measures:
Following responsible disclosure to Google, the company has taken steps to address the vulnerability. In GKE versions 1.28 and later, Google has blocked the binding of the system:authenticated group to the cluster-admin role. The documentation now advises against binding the system:authenticated group to any RBAC roles. Users are urged to assess whether clusters have been bound to the group using both ClusterRoleBindings and RoleBindings and remove any unsafe bindings.
Remediation Steps:
- Google’s Patch: Google has responded to this vulnerability by blocking the binding of the system:authenticated group to the cluster-admin role in GKE versions 1.28 and later. Users are strongly advised to update to these versions.
- Role Binding Best Practices: Users should refrain from binding the system:authenticated group to any RBAC roles. Additionally, it is recommended to assess whether clusters have been bound to the group using both ClusterRoleBindings and RoleBindings and remove any unsafe bindings.
- Continuous Monitoring and Auditing: Establish continuous monitoring mechanisms to detect any unauthorized activities related to cluster access controls. Regularly audit and review permissions to ensure ongoing compliance with security policies.
- User Awareness: Educate administrators about the actual composition of the system:authenticated group and the potential risks associated with overly permissive roles.
- Testing in Controlled Environment: Before implementing changes in a production environment, conduct testing in a controlled setting to ensure modifications do not disrupt essential services.
- Remove Unsafe Bindings: Actively assess and remove any unsafe bindings that might exist within the cluster to mitigate potential vulnerabilities.