CVE-2018-14655 Keycloak vulnerable to cross-site scripting via the state parameter

Medium 4.6 Published Updated

Attackers can inject JavaScript via the state parameter in authentication URLs, leading to XSS and potential account takeover.

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-2018-14655?

CVE-2018-14655 is a medium-severity cross-site scripting vulnerability in Redhat Keycloak, published on 13 Nov 2018. 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 3.4.3.Final, 4.0.0.Beta2, 4.3.0.Final. When using 'response_mode=form_post' it is possible to inject arbitrary Javascript-Code via the 'state'-parameter in the authentication URL. This allows an XSS-Attack upon succesfully login.

Weakness: CWE-79

Which versions are affected by CVE-2018-14655?

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

PackageAffectedFixed in
org.keycloak:keycloak-parent MavenAll versionsNone
org.keycloak:keycloak-parent MavenAll versionsNone
org.keycloak:keycloak-parent MavenAll versions to 3.4.3.FinalNone
org.keycloak:keycloak-parent MavenAll versions to 3.4.3.FinalNone
org.keycloak:keycloak-parent MavenFrom 4.0.0.Beta1 to 4.0.0.Beta2None
org.keycloak:keycloak-parent MavenFrom 4.0.0.Beta1 to 4.0.0.Beta2None

Products include Redhat Keycloak, Redhat Single Sign-On.

How do I fix CVE-2018-14655?

Upgrade to a fixed version.

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-2018-14655 being exploited?

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

All Redhat Keycloak vulnerabilities

Sources

Also known as GHSA-458h-wv48-fq75.

Is CVE-2018-14655 in your software?

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

Check your SBOMs for free