CVE-2022-2256: Keycloak vulnerable to Stored Cross site Scripting (XSS) when loading default roles
5.4
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.53672%
CWE
Published
9/23/2022
Updated
1/7/2023
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| org.keycloak:keycloak-parent | maven | < 19.0.2 | 19.0.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the clientSelectControl function's handling of client IDs in the admin console UI. The commit diff shows:
- Removal of the formatResult function that directly returned unescaped clientId
- Replacement with a mapped response that explicitly constructs text properties
- The original code path allowed arbitrary clientId values (including XSS payloads) to be rendered directly in the DOM. The patch adds proper data handling by explicitly defining text properties rather than relying on raw object values, indicating the vulnerability existed in how client IDs were processed and rendered without sanitization.