8.1high
Org.keycloak/keycloak-services: open redirect when using wildcard valid redirect uris in keycloak
- Severity
- 8.1high CVSS:3.1 by redhat
- Exploit likelihood
- 0.64% (higher than 51% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- redhat
- Also known as
- GHSA-rp95-xpg9-c2cqBIT-KEYCLOAK-2026-7504
Description
A flaw was found in Keycloak's URL validation logic during redirect operations. By crafting a malicious request, an attacker could bypass validation to redirect users to unauthorized URLs, potentially leading to the exposure of sensitive information within the domain or facilitating further attacks. This vulnerability specifically affects Keycloak clients configured with a wildcard (*) in the "Valid Redirect URIs" field and requires user interaction to be successfully exploited. The issue stems from a discrepancy in how Keycloak and the underlying Java URI implementation handle the user-info component of a URL. If a malicious redirect URL is constructed using multiple @ characters in the user-info section, Java's URI parser fails to extract the user-info, leaving only the raw authority field. Consequently, Keycloak's validation check fails to detect the malformed user-info, falls back to a wildcard comparison, and incorrectly permits the malicious redirect.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| rhbk/keycloak-operator-bundle | Not specified Not affected: from 26.2.16-1 before *, from 26.4.12-1 before * | CVE List |
| rhbk/keycloak-rhel9 | Not specified Not affected: from 26.2-21 before *, from 26.4-17 before * | CVE List |
| rhbk/keycloak-rhel9-operator | Not specified Not affected: from 26.2-21 before *, from 26.4-17 before * | CVE List |
| rhbk/keycloak | Not specified Not affected: from rhel9-operator before * | CVE List |
| org.keycloak:keycloak-services (Maven) | before 26.6.2 | GitHub Advisory Database |
| redhat build_of_keycloak | from 26.4 before 26.4.12 | NVD |
| keycloak (Bitnami) | from 26.4.0 before 26.4.12 | Bitnami Vulnerability Database |
All scores
| redhat | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N |
| redhat-SADP | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N |
| GitHub | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N |
| Bitnami Vulnerability Database | high rating |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
A flaw was found in Keycloak's URL validation logic during redirect operations. By crafting a malicious request, an attacker could bypass validation to redirect users to unauthorized URLs, potentially leading to the exposure of sensitive information within the domain or facilitating further attacks. This vulnerability specifically affects Keycloak clients configured with a wildcard (*) in the "Valid Redirect URIs" field and requires user interaction to be successfully exploited. The issue stems from a discrepancy in how Keycloak and the underlying Java URI implementation handle the user-info component of a URL. If a malicious redirect URL is constructed using multiple @ characters in the user-info section, Java's URI parser fails to extract the user-info, leaving only the raw authority field. Consequently, Keycloak's validation check fails to detect the malformed user-info, falls back to a wildcard comparison, and incorrectly permits the malicious redirect.
NVD (es)
Se encontró una falla en la lógica de validación de URL de Keycloak durante las operaciones de redirección. Al elaborar una solicitud maliciosa, un atacante podría eludir la validación para redirigir a los usuarios a URL no autorizadas, lo que podría llevar a la exposición de información sensible dentro del dominio o facilitar ataques adicionales. Esta vulnerabilidad afecta específicamente a clientes de Keycloak configurados con un comodín (*) en el campo ’Valid Redirect URIs’ y requiere interacción del usuario para ser explotada con éxito. El problema se deriva de una discrepancia en cómo Keycloak y la implementación subyacente de URI de Java manejan el componente de información de usuario (user-info) de una URL. Si se construye una URL de redirección maliciosa utilizando múltiples caracteres @ en la sección de información de usuario (user-info), el analizador de URI de Java no logra extraer la información de usuario (user-info), dejando solo el campo de autoridad sin procesar. En consecuencia, la verificación de validación de Keycloak no logra detectar la información de usuario (user-info) malformada, recurre a una comparación con comodín y permite incorrectamente la redirección maliciosa.
References
| https://access.redhat.com/errata/RHSA-2026:19594 | advisory, vendor-advisory, web | |
| https://access.redhat.com/errata/RHSA-2026:19595 | advisory, vendor-advisory, web | |
| https://access.redhat.com/errata/RHSA-2026:19596 | advisory, vendor-advisory, web | |
| https://access.redhat.com/errata/RHSA-2026:19597 | advisory, vendor-advisory, web | |
| https://access.redhat.com/security/cve/CVE-2026-7504 | advisory, vdb-entry, vendor-advisory, web | |
| https://bugzilla.redhat.com/show_bug.cgi?id=2464128 | advisory, issue-tracking, vendor-advisory, web | |
| https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-7504.json | web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-7504 | advisory, web | |
| https://github.com/keycloak/keycloak/pull/49130 | web | |
| https://github.com/keycloak/keycloak/commit/479620769073ac36b782dee65086ab35e8e5d14e | web | |
| https://github.com/keycloak/keycloak | package | |
| https://github.com/keycloak/keycloak/releases/tag/26.6.2 | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-7504 changed 2026-11-26 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-rp95-xpg9-c2cq changed 2026-08-26 | CC-BY-4.0 |
| NVD | CVE-2026-7504 changed 2026-10-26 | Public domain |
| Bitnami Vulnerability Database | BIT-KEYCLOAK-2026-7504 changed 2026-09-08 | Apache-2.0 |