CVE-2026-18214: Keycloak-services: keycloak-services: google external access-token exchange bypasses hosted-domain restriction
A Missing Authorization vulnerability was identified in Keycloak Google Identity Provider implementation. The flaw exists in the external access-token exchange code path, which is used when the Token Exchange V1 feature is enabled. While the standard Google ID-token login flow correctly validates the hd hosted domain claim against the configured hostedDomain setting, the access-token exchange flow skips this validation. When an external access token is provided, Keycloak retrieves the user profile from the Google user-info endpoint but fails to verify that the domain associated with the user matches the restricted domain configured in the Identity Provider settings. An attacker with a valid Google access token for any domain can exploit this flaw if they have access to a confidential client authorized to perform token exchange. Successful exploitation allows the attacker to bypass domain restrictions, obtain a Keycloak access token, and potentially create or link a brokered identity that should have been restricted.
Other sources
Keycloak allows users to log in using Google accounts and can be configured to only allow users from specific Google Workspace domains. A flaw was found where the token exchange feature, which allows swapping a Google token for a Keycloak token, does not check these domain restrictions. This means an attacker with a valid Google account from a different domain could bypass the security check and gain access to the Keycloak realm.
— MITRE
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-18214?
CVE-2026-18214 has a medium severity rating of 6.8.
How do I fix CVE-2026-18214?
To fix CVE-2026-18214, ensure that you apply the latest patches from Keycloak that address this vulnerability.
What type of vulnerability is CVE-2026-18214?
CVE-2026-18214 is classified as a Missing Authorization vulnerability within the Google Identity Provider implementation.
What impact does CVE-2026-18214 have on Keycloak?
CVE-2026-18214 can potentially allow attackers to bypass hosted-domain restrictions during external access-token exchanges.
When was CVE-2026-18214 published?
CVE-2026-18214 was published on July 29, 2026.