CVE-2023-6717 Keycloak: xss via assertion consumer service url in saml post-binding flow
A malicious admin or client can inject JavaScript via SAML ACS URLs, enabling XSS attacks that compromise user sessions and data across realms.
- 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-2023-6717?
CVE-2023-6717 is a medium-severity cross-site scripting vulnerability in Red Hat Migration Toolkit for Applications 6, published on 25 Apr 2024. 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 the SAML client registration in Keycloak that could allow an administrator to register malicious JavaScript URIs as Assertion Consumer Service POST Binding URLs (ACS), posing a Cross-Site Scripting (XSS) risk. This issue may allow a malicious admin in one realm or a client with registration access to target users in different realms or applications, executing arbitrary JavaScript in their contexts upon form submission. This can enable unauthorized access and harmful actions, compromising the confidentiality, integrity, and availability of the complete KC instance.
Weakness: CWE-79
Which versions are affected by CVE-2023-6717?
4 open source packages ship an affected version, including org.keycloak:keycloak-services.
| Package | Affected | Fixed in |
|---|---|---|
org.keycloak:keycloak-services Maven | All versions | 22.0.10 |
org.keycloak:keycloak-services Maven | All versions | 22.0.10 |
org.keycloak:keycloak-services Maven | From 23.0.0 | 24.0.3 |
org.keycloak:keycloak-services Maven | From 23.0.0 | 24.0.3 |
How do I fix CVE-2023-6717?
Upgrade org.keycloak:keycloak-services to a fixed version for your release line: 22.0.10 or 24.0.3.
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-2023-6717 being exploited?
There is no known exploitation of CVE-2023-6717 in the wild and no public exploit code.
Sources
Also known as GHSA-8rmm-gm28-pj8q.