CVE-2022-2256 Keycloak vulnerable to Stored Cross site Scripting (XSS) when loading default roles
A privileged attacker can execute malicious scripts in the Keycloak admin console via stored XSS in default roles, potentially compromising administrative accounts.
- Exploited in the wild
- Not known
- Login needed
- An administrator
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-2256?
CVE-2022-2256 is a low-severity cross-site scripting vulnerability in Redhat Single Sign-On, published on 1 Sep 2022. An attacker needs administrator access to exploit it, with no action from the victim.
Official description
A Stored Cross-site scripting (XSS) vulnerability was found in keycloak as shipped in Red Hat Single Sign-On 7. This flaw allows a privileged attacker to execute malicious scripts in the admin console, abusing the default roles functionality.
Weakness: CWE-79
Which versions are affected by CVE-2022-2256?
2 open source packages ship an affected version, including org.keycloak:keycloak-parent. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.keycloak:keycloak-parent Maven | All versions | 19.0.2 |
org.keycloak:keycloak-parent Maven | All versions | 19.0.2 |
Products include Redhat Single Sign-On.
How do I fix CVE-2022-2256?
Upgrade org.keycloak:keycloak-parent to 19.0.2 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-2256 being exploited?
There is no known exploitation of CVE-2022-2256 in the wild and no public exploit code.
Other vulnerabilities in Redhat Single Sign-On
Sources
Also known as GHSA-w9mf-83w3-fv49.