Fedora Account System
Red Hat Associate
Red Hat Customer
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.