# CVE-2026-18214: Keycloak domain restriction bypass in Google token exchange

Source: https://junglewise.ai/threats/cve-2026-18214-keycloak-domain-restriction-bypass-in-google-token-exchange  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-31. Updated: 2026-07-31  
License: CC BY 4.0 with a link back

CVE-2026-18214 · Severity: medium · CVSS 6.8 · Published 2026-07-31

Keycloak, an open-source identity and access management solution, contains a security flaw in how it handles Google account logins. While administrators can configure the system to only allow users from specific Google Workspace domains, a bypass exists when using the 'token exchange' feature. This could allow an unauthorized individual with a valid Google account from a different organization to gain access to protected corporate resources and data.

Technologies: [Keycloak](https://junglewise.ai/threats/technologies/keycloak). Vendors: [Keycloak](https://junglewise.ai/threats/vendors/keycloak).

## Quick answers

**Is CVE-2026-18214 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-18214 being exploited in the wild.

**How severe is CVE-2026-18214?** Medium severity, with a CVSS score of 6.8, published 31 July 2026.

**Which products and versions are affected?** Keycloak unspecified.

**Is there a fix for CVE-2026-18214?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-18214 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-18214?** Check whether you run Keycloak at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A missing authorization vulnerability (CWE-862) exists in the Keycloak Google Identity Provider implementation when the Token Exchange V1 feature is enabled. While the standard Google ID-token login flow correctly validates the 'hd' (hosted domain) claim, the external access-token exchange path 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 user's domain matches the 'hostedDomain' restriction configured in the Identity Provider settings. An attacker with a valid Google access token and access to a confidential client authorized for token exchange can bypass these restrictions to obtain a Keycloak access token.

## Affected products

- Red Hat Build of Keycloak unspecified
- Keycloak Keycloak unspecified

## Timeline

- 2026-07-29: disclosed: Reported via Red Hat Bugzilla
- 2026-07-31: advisory: NVD publication date

## References

- [https://access.redhat.com/downloads/content/package-browser/](https://access.redhat.com/downloads/content/package-browser/)
- [https://access.redhat.com/jbossnetwork/restricted/listSoftware.html](https://access.redhat.com/jbossnetwork/restricted/listSoftware.html)
- [https://access.redhat.com/security/cve/CVE-2026-18214](https://access.redhat.com/security/cve/CVE-2026-18214)
- [https://bugzilla.redhat.com/show_bug.cgi?id=2508308](https://bugzilla.redhat.com/show_bug.cgi?id=2508308)

## Related threats

- [Keycloak login-failure storage synchronization error in MySQL/MariaDB](https://junglewise.ai/threats/cve-2026-112201-a-flaw-was-found-in-the-login-failure-storage-component-of)
- [Keycloak PKCE bypass in login after password reset](https://junglewise.ai/threats/cve-2026-125652-a-flaw-was-found-in-the-keycloak-services-component-of-keycloak)
- [Keycloak server arbitrary code execution in client authorization](https://junglewise.ai/threats/cve-2026-120984-a-flaw-was-found-in-the-keycloak-server-s-client-management)
- [Keycloak token sanitization bypass in protocol mapper](https://junglewise.ai/threats/cve-2026-97848-a-flaw-was-found-in-the-token-sanitization-logic-of-keycloak-an)
- [Keycloak Dynamic Client Registration privilege escalation](https://junglewise.ai/threats/cve-2026-96547-a-flaw-was-found-in-the-dynamic-client-registration-component-of)
