REDHAT-BUG-2587603: High severity Red Hat OpenShift vulnerability
A flaw was found in OpenShift's TemplateInstance authorization mechanism. The OpenShift API server only validates the spec.requester.username field and fails to authorize the groups, UID, or extra fields provided in the request.
A low-privileged user with permissions to create TemplateInstances (granted by default to all authenticated users via the self-provisioner role) can exploit this by setting the username to their own identity while forging the groups field to include system:cluster-admins.
The template-instance-controller subsequently builds a user identity from these forged groups and uses its own high-privileged service account to create templated objects. By using template parameters to target system namespaces (e.g., openshift-kube-apiserver), an attacker can create a RoleBinding to grant themselves administrative access in that namespace, eventually pivoting to full cluster-admin privileges. This bypasses the security guarantees intended to prevent unprivileged users from escalating permissions via the template controller.
Affected Software
Event History
Frequently Asked Questions
Are ordinary authenticated users affected by default?
Potentially. The ability to create TemplateInstances is granted by default to all authenticated users through the self-provisioner role, allowing a low-privileged user to reach the vulnerable authorization path.
What does an attacker need to exploit this issue?
An attacker needs permission to create TemplateInstances and must set spec.requester.username to their own identity while supplying forged group membership that includes system:cluster-admins.
How can this lead to cluster-wide administrative access?
The template-instance-controller uses the forged identity while creating templated objects with its high-privileged service account. An attacker can use template parameters to target system namespaces and create a RoleBinding granting administrative access, then pivot to cluster-admin privileges.