HIGH 7.3

CVE-2026-9086 Keycloak Client URI Validation Bypass XSS

Keycloak has a security flaw that allows administrators or users with client management permissions to register fake login applications with malicious redirect URIs. By crafting these URIs using case-insensitive JavaScript or data schemes, an attacker can inject and execute malicious code when administrators or users interact with logout flows or the admin console. The vulnerability requires the attacker to have elevated privileges within the system and the victim to click a crafted link, but successful exploitation could compromise the Keycloak server and any accounts or data it protects.

Source data · NVD / CISA · public domain

CVSS
3.1 · 7.3 HIGH · CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N
Weaknesses (CWE)
CWE-79
Affected products
1 configuration(s)
Published / Modified
2026-06-25 / 2026-07-15

NVD description (verbatim)

A flaw was found in Keycloak. A remote attacker with administrative privileges, specifically those with `manage-client` permission or access to client registration endpoints, could bypass client Uniform Resource Identifier (URI) validation. This is achieved by registering a malicious client with a specially crafted redirect URI using a case-insensitive `javascript:` or `data:` scheme. This Cross-Site Scripting (XSS) vulnerability allows for arbitrary code execution in the Keycloak origin when a victim clicks the crafted link, such as in the logout flow or the Admin Console.

13 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

CVE-2026-9086 is a client URI validation bypass in Keycloak that permits stored XSS attacks. The vulnerability stems from insufficient case-insensitive URI scheme validation during client registration. An authenticated attacker with `manage-client` permission or access to client registration endpoints can register a client with a redirect URI using case-insensitive variations of `javascript:` or `data:` schemes (e.g., `JavaScript:`, `jAvAsCrIpT:`, or case variants of `data:`). When a victim navigates to the logout flow or interacts with the Admin Console and triggers the redirect, the malicious URI executes arbitrary JavaScript in the Keycloak origin context. The CVSS 3.1 score of 7.3 reflects high confidentiality and integrity impact (CWE-79: Improper Neutralization of Input During Web Page Generation) moderated by the requirement for prior authentication and user interaction.

Business impact

A successful attack could result in credential harvesting, session hijacking, or privilege escalation within Keycloak. Attackers could steal OAuth tokens, OIDC credentials, or administrative session cookies, potentially compromising downstream applications that rely on Keycloak for authentication. In regulated environments, this could trigger compliance violations and incident reporting obligations. The reputational cost of a compromised identity provider is severe, as it affects trust across your entire application ecosystem.

Affected systems

Red Hat Build of Keycloak is confirmed affected. Organizations using upstream Keycloak or community builds should verify applicability against Red Hat's advisory, as the vulnerability likely affects multiple Keycloak versions. Any deployment where non-root users, service accounts, or delegated administrators have client registration or management capabilities should be considered at risk.

Exploitability

Exploitation requires two conditions: (1) the attacker must possess administrative or client-management privileges within Keycloak, and (2) a victim must click or be redirected to the malicious URI. This limits the attack surface compared to unauthenticated vulnerabilities, but internal threats, compromised admin accounts, or privilege escalation chains can satisfy the first condition. The case-insensitive URI bypass suggests minimal additional complexity once permissions are held. The vulnerability is not listed on the CISA KEV catalog, indicating no evidence of active exploitation in the wild at publication time.

Remediation

Apply the security patch released by Red Hat for Keycloak. Patch version numbers should be verified against the official Red Hat security advisory. As an interim control, restrict client registration and `manage-client` permissions to a minimal set of trusted administrators, audit existing client registrations for suspicious redirect URIs (especially those containing `javascript:` or `data:` in any case variation), and consider network controls limiting administrative access to the Keycloak Admin Console. Monitor logout flows and admin console access for anomalous redirection patterns.

Patch guidance

Check the Red Hat Keycloak security advisories for the specific patched version applicable to your deployment. Test patches in a staging environment to ensure compatibility with any custom client configurations or extensions. Prioritize patching systems where Keycloak serves as the primary identity provider for critical applications. Once patched, perform a URI validation audit of all registered clients to confirm the fix is effective and to identify any legacy malicious registrations.

Detection guidance

Monitor audit logs for client registration events with redirect URIs containing unusual scheme variations (case-insensitive `javascript:`, `data:`, etc.). Alert on unexpected modifications to existing clients, especially those adding or changing redirect URIs. In the Admin Console and logout flow logs, look for execution of inline scripts or unusual document property access patterns. Network-based detection should focus on outbound connections from Keycloak servers following logout or admin interactions, which may indicate credential exfiltration. Review security event logs for XSS-like patterns in request parameters.

Why prioritize this

This vulnerability merits high-priority remediation because: (1) Keycloak is often a critical identity infrastructure component with extensive downstream impact, (2) the XSS payload executes in the Keycloak origin, not a sandboxed context, allowing theft of sensitive tokens and cookies, (3) administrators and users are regularly exposed to logout flows and the Admin Console, increasing attack surface, and (4) once an attacker gains the required permissions—through credential compromise, insider threat, or privilege escalation—exploitation is straightforward and difficult to detect in real-time. Organizations should patch ahead of any signs of weaponization.

Risk score, explained

The CVSS 3.1 score of 7.3 (HIGH) reflects high impact to confidentiality and integrity if exploited, balanced by the requirement for prior local authentication (PR:L) and user interaction (UI:R). The attack vector is network-based (AV:N) and requires low attack complexity (AC:L) once the attacker has permissions. Scope is unchanged (S:U), meaning the impact is limited to the Keycloak service itself, not other systems—though downstream applications may be indirectly compromised through stolen credentials. Organizations with sensitive applications or large user bases depending on Keycloak should treat this as a critical issue despite the score, due to the confidence and prevalence of identity provider attacks.

Frequently asked questions

Can unauthenticated users exploit this vulnerability?

No. The attacker must have administrative privileges or explicit `manage-client` permission within Keycloak to register a malicious client. However, if an attacker gains credentials or escalates privileges through other means, this vulnerability becomes immediately usable.

Does the patch prevent registration of any redirect URI with 'javascript' in it?

The patch should implement case-sensitive URI scheme validation. Verify the specific fix in the Red Hat advisory, but the intent is to block `javascript:` and `data:` schemes while allowing legitimate URIs. Test against your environment's client configurations to confirm no legitimate clients are blocked.

How can I audit for existing malicious clients without applying the patch immediately?

Export or query your Keycloak client list and filter for redirect URIs containing case-insensitive variations of `javascript:`, `data:`, `vbscript:`, or other executable schemes. Red Hat's advisory may provide a detection query or script. Compare against your approved client registration policy. Disable any suspicious clients pending patching.

Will this vulnerability affect my OAuth 2.0 or OIDC integrations?

Only if the attacker can modify client configurations for your integrated applications. The vulnerability is in client registration/management, not in the core OAuth/OIDC token flow. However, a compromised Keycloak instance could issue fraudulent tokens. Ensure your integrated applications validate token signatures and check token issuer claims.

This analysis is based on the CVE record and publicly available vendor advisories as of the publication date. Patch version numbers, specific detection signatures, and affected product versions should be verified against official Red Hat Keycloak security bulletins before implementation. This summary does not constitute legal or compliance advice; organizations should assess risk according to their own threat models and compliance obligations. SEC.co does not provide exploit code, weaponized proof-of-concepts, or detailed attack step-by-step instructions. Always test patches in a non-production environment before deployment. Source: NVD (public-domain), retrieved 2026-08-03. Analysis generated by SEC.co (claude-haiku-4-5).