Keycloak vulnerable to cross-site scripting via the state parameterGHSA-458h-wv48-fq75
MEDIUMGHSA-458h-wv48-fq75 is a medium-severity (CVSS 5.4) Cross-site Scripting (XSS) vulnerability in org.keycloak:keycloak-parent. The records list no fixed version yet; check the vendor advisory below and apply the mitigations in the meantime.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
org.keycloak:keycloak-parent☕org.keycloak:keycloak-parent☕org.keycloak:keycloak-parentReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.keycloak:keycloak-parent | all versions | No fix |
| ☕Maven | org.keycloak:keycloak-parent | ≥ 4.0.0.Beta1 | No fix |
| ☕Maven | org.keycloak:keycloak-parent | all versions | No fix |
Affected Products
keycloakredhatsingle sign-onredhatDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.keycloak:keycloak-parent, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Remediation status
The records we use list no patched version of org.keycloak:keycloak-parent for GHSA-458h-wv48-fq75. Check the maintainer's advisory, and where your build allows, override or pin the dependency away from the vulnerable range.
Mitigate without a patch
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Single Sign-On 7.2.5 zip | see advisory | RHSA-2018:3595 |
| Red Hat Single Sign-On 7.2 for RHEL 6 | rh-sso7-keycloak-0:3.4.14-1.Final_redhat_00001.1.jbcs.el6 | RHSA-2018:3592 |
| Red Hat Single Sign-On 7.2 for RHEL 7 | rh-sso7-keycloak-0:3.4.14-1.Final_redhat_00001.1.jbcs.el7 | RHSA-2018:3593 |
Frequently Asked Questions
Is GHSA-458h-wv48-fq75 in your dependencies?
Find it across Maven, including transitive dependencies.