Keycloak: xss on impersonation under specific circumstances
Key facts
- Attack vector
- Network
- Privileges required
- High
- User interaction
- Required
- Attack complexity
- High
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-79.
Summary
A flaw was found in Keycloak. Under specific circumstances, HTML entities are not sanitized during user impersonation, resulting in a Cross-site scripting (XSS) vulnerability.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Red Hat | Red Hat Single Sign-On 7 | — | — | Not affected | CNA |
| Red Hat | Red Hat Single Sign-On 7.6 for RHEL 7 | — | 18.0.6-1.redhat_00001.1.el7sso | Patch available | CNA |
| Red Hat | Red Hat Single Sign-On 7.6 for RHEL 8 | — | 18.0.6-1.redhat_00001.1.el8sso | Patch available | CNA |
| Red Hat | Red Hat Single Sign-On 7.6 for RHEL 9 | — | 18.0.6-1.redhat_00001.1.el9sso | Patch available | CNA |
| Red Hat | RHEL-8 based Middleware Containers | — | 7.6-20 | Patch available | CNA |
| — | org.keycloak:keycloak-services (Maven) | up to 21.0.0 | — | No fix listed | GHSA-w354-2f3c-qvg9 |
- Red Hat Single Sign-On 7 VendorRed Hat Affected — Fixed in — Not affected CNA
- Red Hat Single Sign-On 7.6 for RHEL 7 VendorRed Hat Affected — Fixed in 18.0.6-1.redhat_00001.1.el7sso Patch available CNA
- Red Hat Single Sign-On 7.6 for RHEL 8 VendorRed Hat Affected — Fixed in 18.0.6-1.redhat_00001.1.el8sso Patch available CNA
- Red Hat Single Sign-On 7.6 for RHEL 9 VendorRed Hat Affected — Fixed in 18.0.6-1.redhat_00001.1.el9sso Patch available CNA
- RHEL-8 based Middleware Containers VendorRed Hat Affected — Fixed in 7.6-20 Patch available CNA
- org.keycloak:keycloak-services (Maven) Vendor— Affected up to 21.0.0 Fixed in — No fix listed GHSA-w354-2f3c-qvg9
Remediation
Red Hat 5 advisories
- RHSA-2023:1043 Released 2023-03-01 · Red Hat rating ImportantRed Hat Single Sign-On 7.6.2 security update on RHEL 7
- Red Hat Single Sign-On 7.6 for RHEL 7 Server rh-sso7-keycloak-18.0.6-1.redhat_00001.1.el7sso, rh-sso7-keycloak-server-18.0.6-1.redhat_00001.1.el7sso
- RHSA-2023:1049 Released 2023-03-01 · Red Hat rating ImportantRed Hat Single Sign-On 7.6.2 security update
- Red Hat Single Sign-On 7
- RHSA-2023:1047 Released 2023-03-01 · Red Hat rating ImportantRed Hat Single Sign-On 7.6.2 for OpenShift image security and enhancement update
- Middleware Containers for OpenShift rh-sso-7/sso76-openshift-rhel8
Show 2 more Red Hat advisories
- RHSA-2023:1045 Released 2023-03-01 · Red Hat rating ImportantRed Hat Single Sign-On 7.6.2 security update on RHEL 9
- Red Hat Single Sign-On 7.6 for RHEL 9 rh-sso7-keycloak-18.0.6-1.redhat_00001.1.el9sso, rh-sso7-keycloak-server-18.0.6-1.redhat_00001.1.el9sso
- RHSA-2023:1044 Released 2023-03-01 · Red Hat rating ImportantRed Hat Single Sign-On 7.6.2 security update on RHEL 8
- Red Hat Single Sign-On 7.6 for RHEL 8 rh-sso7-keycloak-18.0.6-1.redhat_00001.1.el8sso, rh-sso7-keycloak-server-18.0.6-1.redhat_00001.1.el8sso
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Advisory ·
Red Hat RHEL-8 based Middleware Containers, Red Hat Single Sign-On 7 and 3 more products — RHSA-2023:1043
3 records Highest priority Priority LOW 3 LOW
Other records, highest priority first
- TI-2022-03783 Keycloak: reflected xss attackPriority LOW 38
- TI-2022-03591 Keycloak: session takeover with oidc offline refreshtokensPriority LOW 34
- Advisory ·
Red Hat RHEL-8 based Middleware Containers, Red Hat Single Sign-On 7 and 3 more products — RHSA-2023:1044
3 records Highest priority Priority LOW 3 LOW
Other records, highest priority first
- TI-2022-03783 Keycloak: reflected xss attackPriority LOW 38
- TI-2022-03591 Keycloak: session takeover with oidc offline refreshtokensPriority LOW 34
Show 3 more groups
- Advisory ·
Red Hat RHEL-8 based Middleware Containers, Red Hat Single Sign-On 7 and 3 more products — RHSA-2023:1045
3 records Highest priority Priority LOW 3 LOW
Other records, highest priority first
- TI-2022-03783 Keycloak: reflected xss attackPriority LOW 38
- TI-2022-03591 Keycloak: session takeover with oidc offline refreshtokensPriority LOW 34
- Advisory ·
Red Hat RHEL-8 based Middleware Containers, Red Hat Single Sign-On 7 and 3 more products — RHSA-2023:1047
3 records Highest priority Priority MEDIUM 1 MEDIUM, 2 LOW
Other records, highest priority first
- TI-2022-03706 Rhsso-container-image: unsecured management interface exposed to adjecent networkPriority MEDIUM 44
- TI-2022-03591 Keycloak: session takeover with oidc offline refreshtokensPriority LOW 34
- Advisory ·
Red Hat RHEL-8 based Middleware Containers, Red Hat Single Sign-On 7 and 3 more products — RHSA-2023:1049
3 records Highest priority Priority LOW 3 LOW
Other records, highest priority first
- TI-2022-03783 Keycloak: reflected xss attackPriority LOW 38
- TI-2022-03591 Keycloak: session takeover with oidc offline refreshtokensPriority LOW 34
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Middleware Containers for OpenShift | Fixed | RHSA-2023:1047 |
| Red Hat Single Sign-On 7 | Fixed | RHSA-2023:1049 |
| Red Hat Single Sign-On 7.6 for RHEL 7 Server | Fixed | RHSA-2023:1043 |
| Red Hat Single Sign-On 7.6 for RHEL 8 | Fixed | RHSA-2023:1044 |
| Red Hat Single Sign-On 7.6 for RHEL 9 | Fixed | RHSA-2023:1045 |
Timeline
- 2026-10-02 Threatist record created from CVE-2022-1438
- 2026-10-03 Alias added: GHSA-w354-2f3c-qvg9
- 2026-10-07 EPSS moved to the 50th–90th percentile
References
Advisory 8
Other 4
- https://github.com/keycloak/keycloak/security/advisories/GHSA-w354-2f3c-qvg9
- https://access.redhat.com/security/cve/cve-2022-1438
- https://github.com/keycloak/keycloak
- https://github.com/keycloak/keycloak/blob/48835576daa158443f69917ac309e1a7c951bc87/services/src/main/java/org/keycloak/authentication/AuthenticationProcessor.java#L1045
More Red Hat Keycloak vulnerabilities
- TI-2024-01049 Keycloak: path transversal in redirection validation CVSS 3.1HIGH 8.1
- TI-2023-26623 The SSH transport protocol with certain OpenSSH extensions, found in OpenSSH before 9.6… CVSS 3.1MEDIUM 5.9
- TI-2020-08665 Server-side request forgery in keycloak CVSS 3.1MEDIUM 5.3
- TI-2022-03468 Path traversal in Red Hat Keycloak CVSS 3.1CRITICAL 9.1
- TI-2021-03612 A POST based reflected Cross Site Scripting vulnerability on has been identified in Keycloak. CVSS 3.1MEDIUM 6.1
- TI-2022-03994 Cross-site scripting in keycloak CVSS 3.1CRITICAL 10.0
Sources
- CVE-2022-1438 · CVE Program
- CVE-2022-1438 · NVD
- FIRST EPSS
- GHSA-w354-2f3c-qvg9 · GitHub Advisory Database · CC BY 4.0
- CVE-2022-1438 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences