CVE-2023-6927: URL Redirection to Untrusted Site ('Open Redirect') in Red Hat Red Hat build of Keycloak 22
A flaw was found in Keycloak. This issue may allow an attacker to steal authorization codes or tokens from clients using a wildcard in the JARM response mode "form_post.jwt" which could be used to bypass the security patch implemented to address CVE-2023-6134.
AI Analysis
Technical Summary
CVE-2023-6927 is a vulnerability identified in the Red Hat build of Keycloak version 22, specifically involving an open redirect flaw within the JARM (JWT Secured Authorization Response Mode) response mode "form_post.jwt". This vulnerability arises from the improper handling of wildcards in redirect URIs, which can be exploited by an attacker to bypass the security patch implemented for a prior vulnerability (CVE-2023-6134). By leveraging this flaw, an attacker can redirect authorization responses containing sensitive tokens or authorization codes to untrusted sites, potentially stealing these credentials. The vulnerability requires the attacker to have some privileges (PR:L) and user interaction (UI:R), indicating that exploitation is not fully remote or automatic but feasible in targeted scenarios. The CVSS score of 4.6 (medium severity) reflects the limited impact on availability but notable risks to confidentiality and integrity. The flaw affects the OAuth2/OpenID Connect flows managed by Keycloak, a widely used open-source identity and access management solution, particularly in enterprise environments. No public exploits have been reported yet, but the vulnerability poses a risk to organizations relying on Keycloak for secure authentication and authorization, especially where JARM response modes are used with wildcard redirect URIs.
Potential Impact
For European organizations, the impact of CVE-2023-6927 can be significant in environments where Keycloak is deployed as the identity provider, especially in sectors like finance, government, and critical infrastructure that rely heavily on secure authentication mechanisms. The vulnerability could lead to unauthorized disclosure of authorization codes or tokens, enabling attackers to impersonate users or gain unauthorized access to protected resources. This compromises confidentiality and integrity of user sessions and sensitive data. Although availability is not directly affected, the breach of authentication tokens can lead to broader security incidents, including data breaches and compliance violations under regulations such as GDPR. Organizations using JARM response modes with wildcard redirect URIs are particularly vulnerable, as the flaw allows bypassing existing security patches. The absence of known exploits in the wild provides a window for mitigation, but the risk remains for targeted attacks, especially from advanced persistent threats or insider threats.
Mitigation Recommendations
To mitigate CVE-2023-6927, organizations should prioritize updating the Red Hat build of Keycloak to a version where this vulnerability is patched once it becomes available. In the interim, administrators should audit and restrict the use of wildcard redirect URIs in JARM response modes, enforcing strict URI validation policies to prevent open redirects. Implementing additional monitoring around authorization flows and token issuance can help detect anomalous activities indicative of exploitation attempts. Employing multi-factor authentication (MFA) can reduce the impact of stolen tokens. Security teams should review and tighten client configurations to avoid reliance on vulnerable response modes like "form_post.jwt" with wildcards. Regularly reviewing Keycloak security advisories and applying recommended patches promptly is critical. Additionally, conducting penetration testing focused on OAuth2/OpenID Connect flows can help identify and remediate related weaknesses.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain
CVE-2023-6927: URL Redirection to Untrusted Site ('Open Redirect') in Red Hat Red Hat build of Keycloak 22
Description
A flaw was found in Keycloak. This issue may allow an attacker to steal authorization codes or tokens from clients using a wildcard in the JARM response mode "form_post.jwt" which could be used to bypass the security patch implemented to address CVE-2023-6134.
AI-Powered Analysis
Technical Analysis
CVE-2023-6927 is a vulnerability identified in the Red Hat build of Keycloak version 22, specifically involving an open redirect flaw within the JARM (JWT Secured Authorization Response Mode) response mode "form_post.jwt". This vulnerability arises from the improper handling of wildcards in redirect URIs, which can be exploited by an attacker to bypass the security patch implemented for a prior vulnerability (CVE-2023-6134). By leveraging this flaw, an attacker can redirect authorization responses containing sensitive tokens or authorization codes to untrusted sites, potentially stealing these credentials. The vulnerability requires the attacker to have some privileges (PR:L) and user interaction (UI:R), indicating that exploitation is not fully remote or automatic but feasible in targeted scenarios. The CVSS score of 4.6 (medium severity) reflects the limited impact on availability but notable risks to confidentiality and integrity. The flaw affects the OAuth2/OpenID Connect flows managed by Keycloak, a widely used open-source identity and access management solution, particularly in enterprise environments. No public exploits have been reported yet, but the vulnerability poses a risk to organizations relying on Keycloak for secure authentication and authorization, especially where JARM response modes are used with wildcard redirect URIs.
Potential Impact
For European organizations, the impact of CVE-2023-6927 can be significant in environments where Keycloak is deployed as the identity provider, especially in sectors like finance, government, and critical infrastructure that rely heavily on secure authentication mechanisms. The vulnerability could lead to unauthorized disclosure of authorization codes or tokens, enabling attackers to impersonate users or gain unauthorized access to protected resources. This compromises confidentiality and integrity of user sessions and sensitive data. Although availability is not directly affected, the breach of authentication tokens can lead to broader security incidents, including data breaches and compliance violations under regulations such as GDPR. Organizations using JARM response modes with wildcard redirect URIs are particularly vulnerable, as the flaw allows bypassing existing security patches. The absence of known exploits in the wild provides a window for mitigation, but the risk remains for targeted attacks, especially from advanced persistent threats or insider threats.
Mitigation Recommendations
To mitigate CVE-2023-6927, organizations should prioritize updating the Red Hat build of Keycloak to a version where this vulnerability is patched once it becomes available. In the interim, administrators should audit and restrict the use of wildcard redirect URIs in JARM response modes, enforcing strict URI validation policies to prevent open redirects. Implementing additional monitoring around authorization flows and token issuance can help detect anomalous activities indicative of exploitation attempts. Employing multi-factor authentication (MFA) can reduce the impact of stolen tokens. Security teams should review and tighten client configurations to avoid reliance on vulnerable response modes like "form_post.jwt" with wildcards. Regularly reviewing Keycloak security advisories and applying recommended patches promptly is critical. Additionally, conducting penetration testing focused on OAuth2/OpenID Connect flows can help identify and remediate related weaknesses.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- redhat
- Date Reserved
- 2023-12-18T15:44:40.245Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 68e84e5dba0e608b4fb0c53f
Added to database: 10/10/2025, 12:07:57 AM
Last enriched: 11/11/2025, 5:21:56 PM
Last updated: 12/4/2025, 8:07:12 PM
Views: 72
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.