Junglewise Threat Intelligence

CVE-2026-18211: Keycloak secure-client-uris policy bypass via improper host validation

CVE-2026-18211 · Severity: medium · CVSS 4.2 · Published 2026-07-31

Executive brief

Keycloak, an open-source identity and access management solution, contains a security flaw in how it validates web addresses for client applications. The system is designed to ensure that sensitive login data is only sent over secure, encrypted connections, but a bug allows attackers to bypass this check by using specially crafted domain names that mimic trusted local addresses. If exploited, an attacker could intercept a user's authentication codes over an unencrypted connection, potentially leading to unauthorized account access.

Technical details

A vulnerability exists in the 'secure-client-uris' client policy executor within Keycloak's core services (keycloak-services). The executor fails to properly validate the host component of redirect URIs when 'allow-http-on-localhost' is enabled, instead performing a simple string prefix check for 'http://localhost' or 'http://127.0.0.1'. An attacker can exploit this by registering a client via Dynamic Client Registration using a malicious URI that starts with the allowed prefix but resolves to an attacker-controlled domain (e.g., 'http://localhost.attacker.com'). When a victim authenticates, the authorization code is transmitted over cleartext HTTP to the attacker's server. This is classified as improper input validation (CWE-20).

Affected products

  • Red Hat Red Hat Build of Keycloak All versions using keycloak-services package

Timeline

  • 2026-07-29: disclosed: Reported via Red Hat Bugzilla
  • 2026-07-31: advisory: NVD published the CVE record

References

Related threats