You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[CVE-2026-97846] Standard Token Exchange bypasses required mTLS certificate binding and issues an active bearer token when no client certificate is supplied #53187
When a confidential client has mTLS holder-of-key token binding enabled (tls.client.certificate.bound.access.tokens=true), Keycloak correctly rejects ordinary token grants when no client certificate is presented. However, the Standard Token Exchange V2 grant path (StandardTokenExchangeProvider) does not apply the same enforcement. An attacker who holds the client's credentials and a valid subject token whose audience includes that client can submit a token exchange request without a TLS client certificate. The exchange succeeds and returns an active Bearer access token with no cnf.x5t#S256 claim, bypassing the configured sender-constraint entirely.
The root cause is that StandardTokenExchangeProvider constructs its response directly via tokenManager.responseBuilder(...) rather than through OAuth2GrantTypeBase.createTokenResponseBuilder. It never invokes checkAndBindMtlsHoKToken or an equivalent mandatory certificate check. A transient mTLS protocol mapper is added when the client has the holder-of-key setting enabled, but this mapper only handles the success case — when no certificate is present, bindTokenWithClientCertificate returns null and the mapper silently returns the token unchanged. There is no post-generation enforcement to reject the unconstrained token before it is returned.
This issue covers the Standard Token Exchange V2 path. A related bypass in the UMA grant path was addressed in #1166.
Version
26.7.4
Expected behavior
When tls.client.certificate.bound.access.tokens=true is configured on a client, a Standard Token Exchange V2 request submitted without a TLS client certificate should be rejected with 400 invalid_request, consistent with the behavior of all other grant types.
Actual behavior
The token exchange request succeeds and returns an active Bearer access token with no cnf.x5t#S256 claim. The token is accepted as active by Keycloak's introspection endpoint, effectively bypassing the mTLS sender-constraint configured on the client.
This issue was originally tracked in the private repository. Migrated by @abstractj.
changed the title [-][CVE-2026-97846] Standard Token Exchange bypasses required mTLS certificate binding and issues an active bearer token when no client certificate is supplied — #YWH-PGM40475-284[/-][+][CVE-2026-97846] Standard Token Exchange bypasses required mTLS certificate binding and issues an active bearer token when no client certificate is supplied[/+]on Sep 25, 2026
Activity
[-][CVE-2026-97846] Standard Token Exchange bypasses required mTLS certificate binding and issues an active bearer token when no client certificate is supplied — #YWH-PGM40475-284[/-][+][CVE-2026-97846] Standard Token Exchange bypasses required mTLS certificate binding and issues an active bearer token when no client certificate is supplied[/+]Reject standard token exchange when the client certificate is missing
7 remaining items
Reject standard token exchange when the client certificate is missing
Reject standard token exchange when the client certificate is missing
Reject standard token exchange when the client certificate is missing
Reject standard token exchange when the client certificate is missing