CVE-2022-4361 — Vulnerability in keycloak-services — CVE Details
Keycloak vulnerable to cross-site scripting when validating URI-schemes on SAML and OIDC
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.84%). Schedule for your next planned update.
Does your project use an affected org.keycloak:keycloak-services version?
Paste your pom.xml to check it for CVE-2022-4361 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
AssertionConsumerServiceURL is a Java implementation for SAML Service Providers (org.keycloak.protocol.saml). Affected versions of this package are vulnerable to Cross-site Scripting (XSS).
AssertionConsumerServiceURL allows XSS when sending a crafted SAML XML request.
Advisory Timeline
- First published June 30, 2023 (1245 days ago).
- Last revised February 16, 2024 — 230 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
<!-- Update pom.xml dependency version to 21.1.2 for org.keycloak:keycloak-services -->
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: Maven (1).
| Package | Fixed In |
|---|---|
| org.keycloak:keycloak-services Maven · Affected: 1.0-alpha-1, 1.0-alpha-1-12062013, 1.0-alpha-2, 1.0-alpha-3 (+149 more) | 21.1.2 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-79Cross-site Scripting (XSS)MITRE
- CWE-81
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 10.0 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
References
- https://github.com/keycloak/keycloak/security/advisories/GHSA-3p62-6fjh-3p5hWEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-4361ADVISORY
- https://github.com/keycloak/keycloak/commit/a1cfe6e24e5b34792699a00b8b4a8016a5929e3aWEB
- https://bugzilla.redhat.com/show_bug.cgi?id=2151618WEB
- https://github.com/keycloak/keycloakPACKAGE
Frequently Asked Questions
- What is CVE-2022-4361?
- Keycloak vulnerable to cross-site scripting when validating URI-schemes on SAML and OIDC. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 10.0/10).
- How do I check if my project is affected by CVE-2022-4361?
- CVE-2022-4361 affects org.keycloak:keycloak-services. It has a 0.8% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2022-4361 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is an above-median EPSS score — 55.3% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2026-18963CRITICAL
Keycloak: Unauthenticated account takeover via reset-credentials flow bypass
- CVE-2026-107726CRITICAL
Hazelcast allows arbitrary member memory access by low-privileged client
- CVE-2026-107282CRITICAL
AsyncHttpClient: Replay to a different host sends the original host request and credentials to the new host
- CVE-2026-1486HIGH
Keycloak fails to verify if an Identity Provider (IdP) is enabled before issuing tokens
- CVE-2026-3047HIGH
Keycloak SAML Broken has Authentication Bypass by Primary Weakness
- CVE-2026-1529HIGH
Keycloak affected by improper invitation token validation