CVE-2022-4137: Keycloak: reflected xss attack

Published Nov 25, 2022
·
Updated

A flaw was found in Keycloak package. This flaw allows an attacker to benefit from Cross-Site Scripting by sending a script via URL. This flaw requires a user or administrator to interact with a link in order to be vulnerable. This may compromise the user details, may it be changed or collected by the attacker. An administrator who might be affected may also compromise the server data.

Other sources

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.

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.

Affected Software

13 affected componentsFixes available
redhat/rh-sso7-keycloak<0:18.0.6-1.redhat_00001.1.el7
0:18.0.6-1.redhat_00001.1.el7
redhat/rh-sso7-keycloak<0:18.0.6-1.redhat_00001.1.el8
0:18.0.6-1.redhat_00001.1.el8
redhat/rh-sso7-keycloak<0:18.0.6-1.redhat_00001.1.el9
0:18.0.6-1.redhat_00001.1.el9
maven/org.keycloak:keycloak-parent<20.0.5
20.0.5
redhat keycloak
redhat Single Sign-on=7.6
redhat Enterprise Linux=7.0
redhat Enterprise Linux=8.0
redhat Enterprise Linux=9.0
All of the following
redhat Single Sign-on=7.6
Any of the following
redhat Enterprise Linux=7.0
redhat Enterprise Linux=8.0
redhat Enterprise Linux=9.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/rh-sso7-keycloak to a version that resolves this vulnerability.

    Fixed in 0:18.0.6-1.redhat_00001.1.el7
  2. Upgrade

    Upgrade redhat/rh-sso7-keycloak to a version that resolves this vulnerability.

    Fixed in 0:18.0.6-1.redhat_00001.1.el8
  3. Upgrade

    Upgrade redhat/rh-sso7-keycloak to a version that resolves this vulnerability.

    Fixed in 0:18.0.6-1.redhat_00001.1.el9
  4. Upgrade

    Upgrade maven/org.keycloak:keycloak-parent to a version that resolves this vulnerability.

    Fixed in 20.0.5

Event History

Nov 25, 2022
Data Sourced
04:46 PM
DescriptionSeverityAffected Software
Mar 1, 2023
CVE Published
01:56 PM
Data Sourced
01:56 PM
RemedyWeakness
Advisory Published
05:38 PM
Sep 22, 2023
Data Sourced
via Red Hat·02:09 PM
DescriptionSeverityAffected Software
Sep 25, 2023
CVE Published
via MITRE·07:17 PM
Data Sourced
via MITRE·07:17 PM
DescriptionSeverityWeakness
Sep 29, 2023
Updated
04:26 AM
Severity
Nov 7, 2023
Updated
03:57 AM
WeaknessAffected Software
Nov 8, 2023
Advisory Published
05:05 AM
Aug 19, 2025
Exploit Published
via GitHub·01:51 AM
Jun 17, 2026
Data Sourced
via NVD·05:20 AM
DescriptionSeverityWeaknessAffected Software
Updated
via NVD·05:20 AM
Affected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is CVE-2022-4137?

CVE-2022-4137 is a reflected cross-site scripting (XSS) vulnerability found in the 'oob' OAuth endpoint of Keycloak.

2

What is the severity of CVE-2022-4137?

The severity of CVE-2022-4137 is high, with a CVSS score of 8.1.

3

What is the affected software for CVE-2022-4137?

The affected software for CVE-2022-4137 includes Redhat Keycloak, Redhat Single Sign-on, and Redhat Enterprise Linux (versions 7.0, 8.0, 9.0).

4

How does CVE-2022-4137 work?

CVE-2022-4137 allows a malicious link to insert an arbitrary URI into a Keycloak error page through the 'oob' OAuth endpoint.

5

How can I fix CVE-2022-4137?

To fix CVE-2022-4137, update your Keycloak installation to versions 0:18.0.6-1.redhat_00001.1.el7, 0:18.0.6-1.redhat_00001.1.el8, or 0:18.0.6-1.redhat_00001.1.el9.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203