CVE-2022-4137
Keycloak: reflected xss attack
Also known as GHSA-9hhc-pj4w-w5rv
Mitigation
- Upgrade org.keycloak:keycloak-parent to 20.0.5 or later.
Who should check
- Projects that depend on Maven package org.keycloak:keycloak-parent (< 20.0.5)
- Anyone running Red Hat Single Sign-On 7 (versions: see the vendor advisory)
- Anyone running Red Hat Single Sign-On 7.6 for RHEL 7 all versions
- Anyone running Red Hat Single Sign-On 7.6 for RHEL 8 all versions
- Anyone running Red Hat Single Sign-On 7.6 for RHEL 9 all versions
Vulnerability facts
- Affected
- org.keycloak:keycloak-parent < 20.0.5
- Fixed in
- 20.0.5
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 8.1 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: Required
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: None
- EPSS
- 0.87% chance of exploitation in 30 days (percentile 56, 2026-11-26)
- CWE
- CWE-81
- Modified
Description
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Maven org.keycloak:keycloak-parent | < 20.0.5 | 20.0.5 | osv |
| Red Hat Single Sign-On 7 | — | — | cvelist |
| Red Hat Single Sign-On 7.6 for RHEL 7 | all versions | — | cvelist |
| Red Hat Single Sign-On 7.6 for RHEL 8 | all versions | — | cvelist |
| Red Hat Single Sign-On 7.6 for RHEL 9 | all versions | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2022-4137. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2022-4137.md Affected: org.keycloak:keycloak-parent < 20.0.5 Fixed in: 20.0.5 Steps: 1. Search this machine and project for org.keycloak:keycloak-parent (Maven), Red Hat Single Sign-On 7, Red Hat Single Sign-On 7.6 for RHEL 7, Red Hat Single Sign-On 7.6 for RHEL 8, Red Hat Single Sign-On 7.6 for RHEL 9: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
- https://access.redhat.com/errata/RHSA-2023:1043
- https://access.redhat.com/errata/RHSA-2023:1044
- https://access.redhat.com/errata/RHSA-2023:1045
- https://access.redhat.com/errata/RHSA-2023:1049
- https://access.redhat.com/security/cve/CVE-2022-4137
- https://bugzilla.redhat.com/show_bug.cgi?id=2148496
- https://github.com/keycloak/keycloak/security/advisories/GHSA-9hhc-pj4w-w5rv
- https://nvd.nist.gov/vuln/detail/CVE-2022-4137
Patches
FAQ
Is CVE-2022-4137 being exploited?
There is no confirmed exploitation: CVE-2022-4137 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.87% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2022-4137?
High: CVSS 8.1 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.
Which versions are affected by CVE-2022-4137?
org.keycloak:keycloak-parent < 20.0.5.
Is there a fix for CVE-2022-4137?
Yes. Fixed in 20.0.5. Upgrade org.keycloak:keycloak-parent to 20.0.5 or later.
How do I check if I'm affected by CVE-2022-4137?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.