CVE-2022-0225 Stored Cross-Site Scripting (XSS) in Keycloak via groups dropdown
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.
| Package | Affected | Fixed in |
|---|---|---|
org.keycloak:keycloak-core Maven | All versions to 16.1.0 | None |
org.keycloak:keycloak-core Maven | All versions to 16.1.0 | None |
org.keycloak:keycloak-core Maven | All versions | 20.0.0 |
org.keycloak:keycloak-core Maven | All versions | 20.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.
Other vulnerabilities in Redhat Keycloak
- CVE-2022-4361 Keycloak vulnerable to cross-site scripting when validating URI-schemes on SAML and OIDC
- CVE-2022-1245 Keycloak vulnerable to privilege escalation on Token Exchange feature
- CVE-2021-20195 keycloak Self Stored Cross-site Scripting vulnerability
- CVE-2019-14910 Keycloak Authentication Error
- CVE-2019-14909 Keycloak Authentication Error
Sources
Also known as GHSA-755v-r4x4-qf7m, GHSA-fqc7-5xxc-ph7r.