CVE-2020-10776 Cross-site Scripting in keycloak

Medium 4.8 Published Updated

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.

PackageAffectedFixed in
org.keycloak:keycloak-server-spi-private MavenAll versions12.0.0
org.keycloak:keycloak-server-spi-private MavenAll versions12.0.0
org.keycloak:keycloak-services MavenAll versions12.0.0
org.keycloak:keycloak-services MavenAll versions12.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.

All Redhat Keycloak vulnerabilities

Sources

Also known as GHSA-484q-784p-8m5h.

Is CVE-2020-10776 in your software?

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

Check your SBOMs for free