Cross-site scripting in keycloak
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-79.
Summary
Keycloak, an open-source identity and access management solution, has a cross-site scripting (XSS) vulnerability in the SAML or OIDC providers. The vulnerability can allow an attacker to execute malicious scripts by setting the AssertionConsumerServiceURL value or the redirect_uri.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Keycloak | keycloak | — | 21.1.2 | Patch available | CNA |
| — | org.keycloak:keycloak-services (Maven) | before 21.1.2 | 21.1.2 | Patch available | GHSA-3p62-6fjh-3p5h |
- keycloak VendorKeycloak Affected — Fixed in 21.1.2 Patch available CNA
- org.keycloak:keycloak-services (Maven) Vendor— Affected before 21.1.2 Fixed in 21.1.2 Patch available GHSA-3p62-6fjh-3p5h
CPE configurations NVD · 12
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:redhat:keycloak:*:*:*:*:*:*:*:* | before 21.1.2 | Vulnerable | Red Hat |
| cpe:2.3:a:redhat:single_sign-on:*:*:*:*:*:*:*:* | 7.6 to before 7.6.4 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:* | 7.0 | Running on | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:* | 8.0 | Running on | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux:9.0:*:*:*:*:*:*:* | 9.0 | Running on | Red Hat |
| cpe:2.3:a:redhat:single_sign-on:-:*:*:*:text-only:*:*:* | not specified by NVD | Vulnerable | Red Hat |
| cpe:2.3:a:redhat:openshift_container_platform:4.11:*:*:*:*:*:*:* | 4.11 | Vulnerable | Red Hat |
| cpe:2.3:a:redhat:openshift_container_platform:4.12:*:*:*:*:*:*:* | 4.12 | Vulnerable | Red Hat |
| cpe:2.3:a:redhat:openshift_container_platform_for_ibm_linuxone:4.9:*:*:*:*:*:*:* | 4.9 | Vulnerable | Red Hat |
| cpe:2.3:a:redhat:openshift_container_platform_for_ibm_linuxone:4.10:*:*:*:*:*:*:* | 4.10 | Vulnerable | Red Hat |
- cpe:2.3:a:redhat:keycloak:*:*:*:*:*:*:*:* Versions before 21.1.2 Vulnerable ·Red Hat
- cpe:2.3:a:redhat:single_sign-on:*:*:*:*:*:*:*:* Versions 7.6 to before 7.6.4 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:* Versions 7.0 Running on ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:* Versions 8.0 Running on ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux:9.0:*:*:*:*:*:*:* Versions 9.0 Running on ·Red Hat
- cpe:2.3:a:redhat:single_sign-on:-:*:*:*:text-only:*:*:* Versions not specified by NVD Vulnerable ·Red Hat
- cpe:2.3:a:redhat:openshift_container_platform:4.11:*:*:*:*:*:*:* Versions 4.11 Vulnerable ·Red Hat
- cpe:2.3:a:redhat:openshift_container_platform:4.12:*:*:*:*:*:*:* Versions 4.12 Vulnerable ·Red Hat
- cpe:2.3:a:redhat:openshift_container_platform_for_ibm_linuxone:4.9:*:*:*:*:*:*:* Versions 4.9 Vulnerable ·Red Hat
- cpe:2.3:a:redhat:openshift_container_platform_for_ibm_linuxone:4.10:*:*:*:*:*:*:* Versions 4.10 Vulnerable ·Red Hat
Remediation
- Fix · CNA keycloak (keycloak) Fixed in 21.1.2
- Fix · GHSA-3p62-6fjh-3p5h org.keycloak:keycloak-services (Maven) Fixed in 21.1.2 Advisory →
Red Hat 5 advisories
- RHSA-2023:3883 Released 2023-06-27 · Red Hat rating ImportantRed Hat Single Sign-On 7.6.4 security update on RHEL 7
- Red Hat Single Sign-On 7.6 for RHEL 7 Server rh-sso7-keycloak-18.0.8-1.redhat_00001.1.el7sso, rh-sso7-keycloak-server-18.0.8-1.redhat_00001.1.el7sso
- RHSA-2023:3892 Released 2023-06-27 · Red Hat rating ImportantRed Hat Single Sign-On 7.6.4 security update
- Red Hat Single Sign-On 7
- RHSA-2023:3884 Released 2023-06-27 · Red Hat rating ImportantRed Hat Single Sign-On 7.6.4 security update on RHEL 8
- Red Hat Single Sign-On 7.6 for RHEL 8 rh-sso7-keycloak-18.0.8-1.redhat_00001.1.el8sso, rh-sso7-keycloak-server-18.0.8-1.redhat_00001.1.el8sso
Show 2 more Red Hat advisories
- RHSA-2023:3885 Released 2023-06-27 · Red Hat rating ImportantRed Hat Single Sign-On 7.6.4 security update on RHEL 9
- Red Hat Single Sign-On 7.6 for RHEL 9 rh-sso7-keycloak-18.0.8-1.redhat_00001.1.el9sso, rh-sso7-keycloak-server-18.0.8-1.redhat_00001.1.el9sso
- RHSA-2023:3888 Released 2023-06-27 · Red Hat rating ImportantRed Hat Single Sign-On 7.6.4 for OpenShift image security enhancement update
- Middleware Containers for OpenShift rh-sso-7/sso76-openshift-rhel8
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Middleware Containers for OpenShift | Fixed | RHSA-2023:3888 |
| Red Hat Single Sign-On 7 | Fixed | RHSA-2023:3892 |
| Red Hat Single Sign-On 7.6 for RHEL 7 Server | Fixed | RHSA-2023:3883 |
| Red Hat Single Sign-On 7.6 for RHEL 8 | Fixed | RHSA-2023:3884 |
| Red Hat Single Sign-On 7.6 for RHEL 9 | Fixed | RHSA-2023:3885 |
Timeline
- 2026-10-02 Threatist record created from CVE-2022-4361
- 2026-10-03 Alias added: GHSA-3p62-6fjh-3p5h
- 2026-10-11 EPSS moved to the 50th–90th percentile
References
Advisory 2
More Keycloak vulnerabilities
- TI-2017-05120 It was found that the Keycloak Node.js adapter 2.5 - 3.0 did not handle invalid tokens… CVSS 3.0CRITICAL 9.8
- TI-2017-08952 Weak password recovery in Red Hat Keycloak CVSS 3.0HIGH 8.8
- TI-2014-03024 The org.keycloak.services.resources.SocialResource.callback method in JBoss KeyCloak… CVSS 3.0HIGH 8.8
- TI-2026-01295 Org.keycloak/keycloak-quarkus-server: keycloak: unauthorized access via jwt authorization grant with disabled users CVSS 3.1HIGH 8.1
- TI-2017-08950 Insufficient session expiration in Red Hat keycloak CVSS 3.0HIGH 7.5
- TI-2014-02971 JBoss KeyCloak before 1.0.3.Final allows remote attackers to cause a denial of service… CVSS 3.0HIGH 7.5
Sources
- CVE-2022-4361 · CVE Program
- CVE-2022-4361 · NVD
- FIRST EPSS
- GHSA-3p62-6fjh-3p5h · GitHub Advisory Database · CC BY 4.0
- CVE-2022-4361 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences