CVE-2026-142136 in Keycloakinfo

Summary

by MITRE • 12/02/2026

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.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 12/02/2026

The vulnerability identified in the Keycloak Operator stems from a fundamental misalignment between operational convenience and security best practices regarding secret management within containerized environments. The flaw is rooted in the default behavior and documentation guidance which encourages users to embed sensitive credentials, such as client secrets and private keys, directly into the KeycloakRealmImport custom resource definitions. This approach treats configuration data and cryptographic material as equivalent standard Kubernetes resources rather than distinct entities requiring specialized protection mechanisms. By integrating these critical assets directly into the realm import manifests, the architecture inadvertently bypasses the isolation layers typically provided by dedicated secret management systems like Kubernetes Secrets or external vaults such as HashiCorp Vault.

From a technical perspective, this design choice creates a significant exposure vector because standard custom resources do not inherit the access control and encryption-at-rest protections associated with native Secret objects in Kubernetes clusters. Consequently, any user account possessing basic read permissions for the specific namespace where these KeycloakRealmImport resources are deployed can retrieve the full contents of the manifest files. This includes plaintext private keys and client secrets that are essential for authenticating to external identity providers or securing API communications within the realm. The lack of separation between configuration logic and sensitive material means that privilege escalation is not required; even low-privileged service accounts or compromised developer credentials with list-watch permissions on custom resources can exfiltrate this data without triggering typical security alerts associated with secret access patterns.

The operational impact of this vulnerability is severe, as it potentially leads to the complete compromise of the Keycloak realm and any downstream systems relying on its authentication services. An attacker who obtains these secrets can impersonate legitimate clients, forge tokens, or decrypt sensitive communications protected by the exposed private keys. This undermines the integrity of single sign-on operations across an organization's infrastructure. Furthermore, because Kubernetes audit logs may not distinguish between reads of standard resources and those containing high-value credentials in this context, detection becomes difficult without additional monitoring layers specifically tuned to detect exfiltration patterns from custom resource definitions rather than traditional secret stores.

This issue aligns with CWE-798: Use of Hard-coded Credentials, as it involves the inclusion of sensitive authentication data within configuration files that are accessible via standard API mechanisms. It also relates to CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, given that the information is retrievable by users who should not have access to such privileged material. In terms of MITRE ATT&CK tactics, this vulnerability facilitates Initial Access and Credential Access phases, allowing adversaries to leverage stolen credentials for lateral movement or persistence within the identity management ecosystem.

To mitigate this risk, organizations must immediately decouple sensitive data from configuration manifests. The recommended approach is to migrate all client secrets, private keys, and other high-value credentials into Kubernetes Secret objects using external secret operators or native encryption providers. These secrets should then be referenced by the KeycloakRealmImport resources via volume mounts or environment variables rather than being embedded inline. Additionally, strict Role-Based Access Control policies must be enforced to ensure that only highly privileged service accounts with explicit permissions can access these dedicated secret stores. Regular audits of custom resource definitions are also advised to identify and remediate any remaining instances where sensitive data has been improperly committed to version control or cluster storage.

Responsible

Redhat

Reservation

12/02/2026

Disclosure

12/02/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Might our Artificial Intelligence support you?

Check our Alexa App!