Fedora Account System
Red Hat Associate
Red Hat Customer
A flaw was found in the Keycloak Operator. The vulnerability exists because the KeycloakRealmImport custom resource (CR) allows sensitive realm export data, including client secrets, key-provider secrets, and private keys, to be stored in plaintext within the spec.realm field. In a standard Kubernetes environment, access to Secret objects is strictly controlled; however, permissions to read custom resources are often delegated separately. An attacker with namespaced get permission on keycloakrealmimports.k8s.keycloak.org can retrieve the full CR content, bypassing the lack of access to Kubernetes Secrets. Successful exploitation allows an attacker to recover active reusable client credentials and realm signing or encryption keys, enabling them to impersonate clients, decrypt sensitive data, or gain unauthorized administrative access to the Keycloak realm.