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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| keycloak | keycloak | — | 21.1.2 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Red Hat Single Sign On 7 | rh-sso7-keycloak +1 | 18.0.8-1.redhat_00001.1.el7sso | RHSA-2023:3885, RHSA-2023:3884, RHSA-2023:3883 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 2 repositories
-
faccimatteo/CVE-2022-4361 ★ 0 · Nov 9, 2025
PoC for https://nvd.nist.gov/vuln/detail/CVE-2022-4361
-
shoucheng3/keycloak__keycloak_CVE-2022-4361_21-1-1 ★ 0 · Aug 16, 2025
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Maven | org.keycloak:keycloak-services | < 21.1.2 | 21.1.2 | GHSA-3p62-6fjh-3p5h |
Advisories 4
- RHSA-2023:3885 Red Hat Security Advisory: Red Hat Single Sign-On 7.6.4 security update on RHEL 9 Red Hat Security Advisories (RHSA) · Oct 2, 2026
- RHSA-2023:3883 Red Hat Security Advisory: Red Hat Single Sign-On 7.6.4 security update on RHEL 7 Red Hat Security Advisories (RHSA) · Oct 2, 2026
- RHSA-2023:3884 Red Hat Security Advisory: Red Hat Single Sign-On 7.6.4 security update on RHEL 8 Red Hat Security Advisories (RHSA) · Oct 2, 2026
- WID-SEC-2023-1584 Red Hat Single Sign On: Mehrere Schwachstellen BSI CERT-Bund (WID) · Apr 27, 2025