CVE-2018-14655 Keycloak vulnerable to cross-site scripting via the state parameter
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.
| Package | Affected | Fixed in |
|---|---|---|
org.keycloak:keycloak-parent Maven | All versions | None |
org.keycloak:keycloak-parent Maven | All versions | None |
org.keycloak:keycloak-parent Maven | All versions to 3.4.3.Final | None |
org.keycloak:keycloak-parent Maven | All versions to 3.4.3.Final | None |
org.keycloak:keycloak-parent Maven | From 4.0.0.Beta1 to 4.0.0.Beta2 | None |
org.keycloak:keycloak-parent Maven | From 4.0.0.Beta1 to 4.0.0.Beta2 | None |
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.
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-458h-wv48-fq75.