CVE-2026-105302 in Keycloakinfo

Summary

by MITRE • 10/05/2026

A flaw was found in the User Session Note mapper of the Keycloak identity and access management solution. The issue occurs because the mapper does not validate whether a requested session note contains sensitive internal credentials, such as federated access tokens from external identity providers. This allows a delegated client administrator to leak a user's upstream bearer tokens into the tokens issued to their managed application, potentially leading to unauthorized access to the user's data on external platforms.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 10/05/2026

The vulnerability identified in Keycloak involves a critical flaw within the User Session Note mapper component of its identity and access management architecture. This specific module is responsible for transferring attributes from an authenticated session into tokens issued to relying parties or client applications. The core technical deficiency lies in the absence of rigorous validation logic when processing these session notes. Specifically, the mapper fails to distinguish between benign user metadata and sensitive internal credentials that are stored within the session context. In a typical OAuth 2.0 or OpenID Connect flow facilitated by Keycloak, upstream identity providers issue access tokens which serve as proof of authentication for external resources. These tokens often contain high-privilege scopes and should remain confined to their intended scope of use. However, due to this validation gap, the mapper indiscriminately includes these internal session notes in the outgoing token payload without checking if they represent sensitive upstream bearer tokens or other confidential credentials from federated identity providers.

This architectural oversight creates a severe security risk known as credential leakage through token propagation. When an administrator delegates control over certain client applications to another user or service, that delegated administrator can configure mappers to include specific session attributes in the issued access tokens. Because the mapper does not filter out sensitive upstream credentials, any such attribute included by the configuration will be embedded directly into the new token presented to the managed application. Consequently, a malicious actor with delegated administrative privileges over a client application can extract these leaked upstream bearer tokens. These extracted tokens are valid for accessing resources on external platforms where the user is authenticated via the federated identity provider. This effectively bypasses the intended isolation boundaries between different trust domains and allows unauthorized access to sensitive data hosted by third-party services, compromising both confidentiality and integrity of user information across multiple systems.

From a classification perspective, this vulnerability aligns with CWE-209, which describes the generation of an error message that includes sensitive information, although in this case it is more accurately categorized under CWE-538, where object or data is inserted into a context in which it should not be present, leading to unintended exposure. Furthermore, within the MITRE ATT&CK framework, this behavior facilitates Credential Access techniques such as T1078 Valid Accounts and potentially T1528 Steal Application Access Token if leveraged for lateral movement across federated services. The impact extends beyond simple data theft; it undermines the principle of least privilege by allowing delegated administrators to escalate their influence into external identity ecosystems, thereby expanding the attack surface significantly.

Mitigation strategies must focus on implementing strict allow-listing mechanisms within the User Session Note mapper configuration. Administrators should explicitly define which session attributes are safe for inclusion in outgoing tokens and ensure that any attribute related to upstream authentication context or internal Keycloak metadata is excluded from propagation. Regular audits of client application configurations are essential to detect unauthorized mappers that may have been added by delegated administrators with malicious intent. Additionally, enabling detailed audit logging for token generation events can help identify instances where sensitive session data is being inadvertently included in issued tokens. Upgrading to a patched version of Keycloak that includes validation logic to filter out upstream credentials from the mapper output is the primary remediation step required to close this security gap and restore proper isolation between federated identity contexts and client application scopes.

Responsible

Redhat

Reservation

10/05/2026

Disclosure

10/05/2026

Moderation

accepted

EPSS

0.00201

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!