CVE-2022-4361 Keycloak
| Affected software | Keycloak |
|---|---|
| Severity | 10.0 Critical CVSS 3.1 2 scores |
| Fixed in | 21.1.2 |
| Weakness | Cross-site scripting (CWE-79) |
| Published | 7 Jul 2023 |
| Updated | 17 Jun 2026 |
Description
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.
CWE-81
Exploitation status
No public exploit
No exploit has been reported in the sources we check. The 1 repository below are public GitHub repositories with fewer than 5 stars.
Exploitation status
- CISA KEV not listed
- VulnCheck KEV not listed
- CISA Vulnrichment exploitation: none
- Indexed PoC 1 indexed, none at 5+ stars
- EPSS 0.69% chance in 30 days
| Index | Artifact | Stars | First seen |
|---|---|---|---|
| GitHub PoC | PoC for https://nvd.nist.gov/vuln/detail/CVE-2022-4361 | 2025-11-09 |
Waratek protection
Waratek has a rule that blocks attacks on this vulnerability.
- Protection full
- Action available security rule
- Review human Researcher
- Record active
| Decided by | Manual classification of this CVE in the legacy dataset |
|---|---|
| Finding | A manual classification set this CVE's status to Protected by Waratek. |
How to mitigate CVE-2022-4361
Upgrade Keycloak to 21.1.2 or later. Until you can, Waratek RASP blocks exploitation with a security rule that blocks this kind of attack. It runs inside the Java application, with no code changes.
CVSS
10.0 CRITICAL
v3.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
2 metrics
CVSS
10.0 CRITICAL v3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
2 metrics
We show the highest score from the newest CVSS version. Scores from different versions can't be compared, and the first score listed is sometimes a 0.0 placeholder.
| Version | Score | Band | Vector | Assigner | Type | |
|---|---|---|---|---|---|---|
| CVSS 3.1 | 10.0 | CRITICAL | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
secalert@redhat.com | Secondary | published |
| CVSS 3.1 | 6.1 | MEDIUM | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
NVD | Primary |
Affected software and releases
Maven packages
Affected and fixed versions, from OSV.dev| Package | Introduced | Fixed | Last affected |
|---|---|---|---|
org.keycloak:keycloak-services |
0 | 21.1.2 |
unbounded |
Products and versions
6 products, 10 version entries| Source | Vendor | Product | Scheme | Affected versions |
|---|---|---|---|---|
| osv | org.keycloak | keycloak-services | generic | < 21.1.2 |
| nvd | redhat | keycloak | generic | < 21.1.2 |
| nvd | redhat | openshift container platform | generic | 4.11 · 4.12 |
| nvd | redhat | openshift container platform for ibm linuxone | generic | 4.9 · 4.10 |
| nvd | redhat | openshift container platform for power | generic | 4.9 · 4.10 |
| nvd | redhat | single sign-on | generic | any version · ≥ 7.6 and < 7.6.4 |
References
Timeline
Timeline
| Published | 2023-07-07 | By the CVE Program. |
|---|---|---|
| NVD record modified | 2026-06-17 | NVD's own last-modified date for this record. |