GHSA-755v-r4x4-qf7m: Keycloak core Cross-Site Scripting Vulnerability
MODERATEGHSA-755v-r4x4-qf7m is a MODERATE cross-site scripting vulnerability (CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)) affecting Keycloak core libraries in the Maven ecosystem. The issue involves stored cross-site scripting (xss) in keycloak via groups dropdown. Remediation is available by upgrading affected packages to version 20.0.0.
GHSA-755v-r4x4-qf7m at a Glance
How to Fix GHSA-755v-r4x4-qf7m
To remediate this vulnerability, upgrade all affected Keycloak core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
<version>20.0.0</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.keycloak
How to Check if You Are Affected
To determine whether your Java application is affected by GHSA-755v-r4x4-qf7m, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.keycloak
Analyze the terminal output to locate any version of Keycloak core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 20.0.0), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.keycloak command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS), where the product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as "<", ">", and "&" that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages. In Keycloak core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-755v-r4x4-qf7m Affected Keycloak core Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.keycloak:keycloak-core
|
Maven |
< 20.0.0
|
20.0.0
|
References
Frequently Asked Questions
What is GHSA-755v-r4x4-qf7m?
Which Keycloak core versions are affected?
What version fixes GHSA-755v-r4x4-qf7m?
Is keycloak-core affected?
What CWE is associated with GHSA-755v-r4x4-qf7m?
How can I check Maven dependencies for GHSA-755v-r4x4-qf7m?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-755v-r4x4-qf7m",
"modified" : "2022-11-29T23:55:23Z",
"published" : "2022-11-29T23:55:23Z",
"aliases" : [ ],
"summary" : "Stored Cross-Site Scripting (XSS) in Keycloak via groups dropdown",
"details" : "### Summary\n\nA Stored XSS vulnerability was reported in the Keycloak Security mailing list, affecting all the versions of Keycloak, including the latest release (16.0.1). The vulnerability allows a privileged attacker to execute malicious scripts in the admin console, abusing of the groups' dropdown functionality. \n\n### Impact\n\nSuccessful attacks of this vulnerability can result a privileged attacker to load a XSS script, and steal data from other users. The impact can be considered moderate to low, considering privileged credentials are required.\n\n### References\n- Please refer to the Keycloak Security mailing list for more information.\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.keycloak:keycloak-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "20.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/keycloak/keycloak/security/advisories/GHSA-755v-r4x4-qf7m"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/keycloak/keycloak"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-80" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-11-29T23:55:23Z",
"nvd_published_at" : null
}
}