CVE-2020-10776 Cross-site Scripting in keycloak
Attackers can inject malicious scripts via unsafe redirect_uri schemes in Keycloak, potentially leading to session hijacking or code execution.
- Exploited in the wild
- Not known
- Login needed
- An administrator
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2020-10776?
CVE-2020-10776 is a medium-severity cross-site scripting vulnerability in Redhat Keycloak, published on 17 Nov 2020. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.
Official description
A flaw was found in Keycloak before version 12.0.0, where it is possible to add unsafe schemes for the redirect_uri parameter. This flaw allows an attacker to perform a Cross-site scripting attack.
Weakness: CWE-79
Which versions are affected by CVE-2020-10776?
4 open source packages ship an affected version, including org.keycloak:keycloak-server-spi-private and org.keycloak:keycloak-services. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.keycloak:keycloak-server-spi-private Maven | All versions | 12.0.0 |
org.keycloak:keycloak-server-spi-private Maven | All versions | 12.0.0 |
org.keycloak:keycloak-services Maven | All versions | 12.0.0 |
org.keycloak:keycloak-services Maven | All versions | 12.0.0 |
Products include Redhat Keycloak.
How do I fix CVE-2020-10776?
Upgrade org.keycloak:keycloak-server-spi-private to 12.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-2020-10776 being exploited?
There is no known exploitation of CVE-2020-10776 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-484q-784p-8m5h.