CVE-2022-0225 Stored Cross-Site Scripting (XSS) in Keycloak via groups dropdown

Medium 5.4 Published Updated

A privileged attacker can inject malicious scripts via group names in Keycloak, enabling stored XSS attacks against other users.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2022-0225?

CVE-2022-0225 is a medium-severity cross-site scripting vulnerability in Redhat Keycloak, published on 26 Aug 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

A flaw was found in Keycloak. This flaw allows a privileged attacker to use the malicious payload as the group name while creating a new group from the admin console, leading to a stored Cross-site scripting (XSS) attack.

Weakness: CWE-79

Which versions are affected by CVE-2022-0225?

4 open source packages ship an affected version, including org.keycloak:keycloak-core. It affects 2 products.

PackageAffectedFixed in
org.keycloak:keycloak-core MavenAll versions to 16.1.0None
org.keycloak:keycloak-core MavenAll versions to 16.1.0None
org.keycloak:keycloak-core MavenAll versions20.0.0
org.keycloak:keycloak-core MavenAll versions20.0.0

Products include Redhat Keycloak, Redhat Single Sign-On.

How do I fix CVE-2022-0225?

Upgrade org.keycloak:keycloak-core to 20.0.0 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2022-0225 being exploited?

There is no known exploitation of CVE-2022-0225 in the wild and no public exploit code.

All Redhat Keycloak vulnerabilities

Sources

Also known as GHSA-755v-r4x4-qf7m, GHSA-fqc7-5xxc-ph7r.

Is CVE-2022-0225 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free