Skip to main content
Vulnerability Database/CVE-2026-105302

CVE-2026-105302: Keycloak Information Disclosure Vulnerability

CVE-2026-105302 is an information disclosure flaw in Keycloak that exposes sensitive session data including federated access tokens. This post covers the technical details, affected versions, impact, and mitigation.

Published:

CVE-2026-105302 Overview

CVE-2026-105302 is an information disclosure vulnerability in the User Session Note mapper of Keycloak, Red Hat's identity and access management (IAM) solution. The mapper fails to validate whether a requested session note contains sensitive internal credentials. A delegated client administrator can abuse this behavior to map upstream federated access tokens into tokens issued to their managed application. The leaked bearer tokens can grant unauthorized access to the user's data on external identity providers. The flaw is tracked under [CWE-200: Exposure of Sensitive Information to an Unauthorized Actor].

Critical Impact

A delegated client administrator can exfiltrate upstream federated bearer tokens by configuring a User Session Note mapper, enabling unauthorized access to users' accounts on external identity providers.

Affected Products

  • Red Hat Keycloak (identity and access management solution)
  • Red Hat Single Sign-On / Red Hat build of Keycloak distributions
  • Deployments using federated external identity providers with session note storage

Discovery Timeline

  • 2026-10-05 - CVE-2026-105302 published to the National Vulnerability Database
  • 2026-10-06 - Last updated in the NVD database

Technical Details for CVE-2026-105302

Vulnerability Analysis

Keycloak stores runtime data about a user's authenticated session in server-side structures called session notes. When a user authenticates through an external identity provider, Keycloak can persist the upstream access token in these notes to support downstream API calls. Administrators normally expose selected session notes to client applications using the User Session Note protocol mapper.

The mapper does not enforce an allow-list or deny-list on which session note keys may be requested. A delegated client administrator with permission to configure protocol mappers on their own client can therefore reference note keys that hold federated bearer tokens. Keycloak then embeds the token value into the ID token, access token, or userinfo response issued to the managed application.

Because the issued token is cryptographically valid and delivered through normal OpenID Connect (OIDC) flows, the receiving application obtains an upstream credential it was never authorized to hold.

Root Cause

The root cause is missing input validation on the claim.name and session note key configuration of the User Session Note mapper. Keycloak treats all session notes as equally exposable, with no distinction between application-safe values and sensitive internal credentials such as FEDERATED_ACCESS_TOKEN.

Attack Vector

Exploitation requires a delegated administrator account with mapper configuration rights on a target client. The attacker creates or modifies a User Session Note mapper to reference the session note key that stores the federated upstream token. When a victim authenticates to the client, Keycloak issues an OIDC token containing the upstream bearer token. The attacker's application then replays that token against the external identity provider's APIs. User interaction is required because the victim must complete authentication through the vulnerable client.

The vulnerability is described in prose because no verified proof-of-concept code is published. See the Red Hat CVE-2026-105302 Advisory and Red Hat Bug Report #2545800 for vendor technical details.

Detection Methods for CVE-2026-105302

Indicators of Compromise

  • User Session Note mappers whose configured note name matches FEDERATED_ACCESS_TOKEN, IDENTITY_PROVIDER_TOKEN, or other internal credential keys.
  • Issued OIDC tokens or userinfo responses that contain claims resembling third-party bearer tokens (long opaque strings or JWTs issued by external providers).
  • Keycloak admin event logs showing CREATE or UPDATE actions of type PROTOCOL_MAPPER by delegated client administrators.

Detection Strategies

  • Audit all protocol mappers of type oidc-usersessionmodel-note-mapper across every realm and client, and compare configured note names against an approved list.
  • Decode issued access tokens in staging and inspect custom claims for values that validate against upstream identity provider introspection endpoints.
  • Correlate Keycloak admin events with downstream API calls to federated providers to spot anomalous use of upstream tokens by managed clients.

Monitoring Recommendations

  • Forward Keycloak admin and login events to a centralized SIEM and alert on protocol mapper changes performed by non-realm administrators.
  • Monitor external identity provider logs for API access patterns originating from client applications that should not hold upstream tokens.
  • Track creation of new clients and mapper configurations in Keycloak as high-signal change events.

How to Mitigate CVE-2026-105302

Immediate Actions Required

  • Inventory every User Session Note mapper in all realms and remove mappers that reference federated or internal credential note keys.
  • Restrict the manage-clients and manage-identity-providers roles so that only trusted realm administrators can configure protocol mappers.
  • Rotate any upstream federated credentials that may have been exposed through managed client applications.

Patch Information

Refer to the Red Hat CVE-2026-105302 Advisory for fixed package versions of Red Hat build of Keycloak and Red Hat Single Sign-On. Apply the vendor-supplied update that enforces validation of session note keys in the User Session Note mapper. Verify the fix by attempting to configure a mapper referencing FEDERATED_ACCESS_TOKEN and confirming the server rejects the request.

Workarounds

  • Remove delegated client administration permissions from untrusted tenants until the patch is applied.
  • Disable storage of upstream federated tokens by unsetting the Store Tokens option on affected identity provider configurations where downstream API access is not required.
  • Review and prune custom claim mappers on all clients to ensure only business-required session notes are exposed.
bash
# Example: list User Session Note mappers in a realm using kcadm.sh
kcadm.sh config credentials --server https://keycloak.example.com \
  --realm master --user admin

kcadm.sh get clients -r <realm> \
  --fields 'id,clientId,protocolMappers'

# Remove a suspicious mapper by id
kcadm.sh delete clients/<client-id>/protocol-mappers/models/<mapper-id> \
  -r <realm>

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.