CVE-2022-4137 json
Keycloak: reflected xss attack
published 2023-03-01 3 y ago modified 2026-06-17 4 mo ago also GHSA-9hhc-pj4w-w5rv , EUVD-2023-0968
- cvss
- 8.1
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.2%
- EPSS 1.2% chance of exploitation in 30 days, percentile 68%
- public exploits
- 0
- none known
Summary
A reflected cross-site scripting (XSS) vulnerability was found in the 'oob' OAuth endpoint due to incorrect null-byte handling. This issue allows a malicious link to insert an arbitrary URI into a Keycloak error page. This flaw requires a user or administrator to interact with a link in order to be vulnerable. This may compromise user details, allowing it to be changed or collected by an attacker.
Patch / fix
- maven org.keycloak:keycloak-parent 20.0.5
- Red Hat Red Hat Single Sign-On 7.6 for RHEL 7 0:18.0.6-1.redhat_00001.1.el7sso
- Red Hat Red Hat Single Sign-On 7.6 for RHEL 8 0:18.0.6-1.redhat_00001.1.el8sso
- Red Hat Red Hat Single Sign-On 7.6 for RHEL 9 0:18.0.6-1.redhat_00001.1.el9sso
- rh-sso7-keycloak red hat single sign on 7.6 18.0.6-1.redhat_00001.1.el7sso
- rh-sso7-keycloak-server red hat single sign on 7.6 18.0.6-1.redhat_00001.1.el7sso
- rh-sso7-keycloak red hat single sign on 7.6 18.0.6-1.redhat_00001.1.el8sso
- rh-sso7-keycloak-server red hat single sign on 7.6 18.0.6-1.redhat_00001.1.el8sso
- rh-sso7-keycloak red hat single sign on 7.6 18.0.6-1.redhat_00001.1.el9sso
- rh-sso7-keycloak-server red hat single sign on 7.6 18.0.6-1.redhat_00001.1.el9sso
red hat advisories RHSA-2023:1043RHSA-2023:1044RHSA-2023:1045
- github.com/keycloak/keycloak@30d0e9d commit
- github.com/keycloak/keycloak#16774 pull request
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2022-4137 updated cvss 8.1
keycloak: reflected XSS attack
-
Red Hat Single Sign-On 7fixed: vendor fix RHSA-2023:1049
-
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.el7ssofixed: vendor fix RHSA-2023:1043
-
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.el8ssofixed: vendor fix RHSA-2023:1044
-
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.el9ssofixed: vendor fix RHSA-2023:1045
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
1.19% chance of exploitation in the next 30 days, higher than 68% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N |
| NVD | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| GitHub | 3.1 | 8.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| maven | org.keycloak:keycloak-parent | <20.0.5 |
20.0.5 |
Affected products
- Red Hat Red Hat Single Sign-On 7
- Red Hat Red Hat Single Sign-On 7.6 for RHEL 7
- Red Hat Red Hat Single Sign-On 7.6 for RHEL 8
- Red Hat Red Hat Single Sign-On 7.6 for RHEL 9
Classification
References
-
github.com
/keycloak/keycloak/pull/16774
web
-
github.com
/keycloak/keycloak/commit/30d0e9d22dae51392e5a3748a1c68c116667359a
web
-
access.redhat.com
/errata/RHSA-2023:1043
vendor-advisory, web
-
access.redhat.com
/errata/RHSA-2023:1044
vendor-advisory, web
-
access.redhat.com
/errata/RHSA-2023:1045
vendor-advisory, web
-
access.redhat.com
/errata/RHSA-2023:1049
vendor-advisory, web
-
access.redhat.com
/security/cve/CVE-2022-4137
vdb-entry, web, vendor-advisory
-
bugzilla.redhat.com
/show_bug.cgi?id=2148496
issue-tracking, web, vendor-advisory
-
github.com
/keycloak/keycloak/security/advisories/GHSA-9hhc-pj4w-w5rv
web
-
nvd.nist.gov
/vuln/detail/CVE-2022-4137
advisory
-
github.com
/keycloak/keycloak
package
Sources
- CVE List CVE-2022-4137
- GitHub Advisory GHSA-9hhc-pj4w-w5rv
- NVD CVE-2022-4137
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.