CVE-2026-142136: Keycloak-operator: keycloak-operator: plaintext credentials exposure in keycloakrealmimport custom resource

Published Dec 2, 2026
·
Updated

A flaw was found in the Keycloak Operator, which is used to manage Keycloak instances on Kubernetes and OpenShift. The issue occurs because the documentation and default behavior encourage users to include sensitive information, such as client secrets and private keys, directly within the KeycloakRealmImport custom resource. Because these resources are not treated as protected secrets by Kubernetes, an attacker with basic read permissions for the custom resource can recover this sensitive material, potentially leading to full compromise of the Keycloak realm.

Other sources

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.

— Red Hat

Affected Software

1 affected component
Red Hat Keycloak Operator

Event History

Dec 2, 2026
Data Sourced
via Red Hat·02:11 PM
DescriptionSeverityAffected Software
CVE Published
via MITRE·04:00 PM
Data Sourced
via MITRE·04:00 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is exposed to this issue?

Clusters are exposed when KeycloakRealmImport resources contain sensitive realm-export data and users or workloads have namespaced read access to keycloakrealmimports.k8s.keycloak.org. This can affect readers that are not permitted to read Kubernetes Secret objects.

2

What access does an attacker need?

An attacker needs namespaced get permission on keycloakrealmimports.k8s.keycloak.org. No access to Kubernetes Secrets is required if the sensitive material is present in the custom resource.

3

How can I determine whether sensitive data is exposed?

Review KeycloakRealmImport resources and check the spec.realm field for client secrets, key-provider secrets, or private keys. Any such values stored there can be retrieved by principals allowed to read the resource.

4

Does this depend on an unusual configuration?

No unusual custom-resource configuration is indicated. The documented and default behavior encourages placing sensitive information directly in the KeycloakRealmImport custom resource, where it is stored as plaintext.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203