Improper Encoding or Escaping of Output in Keycloak - CVE-2021-20323

 

Improper Encoding or Escaping of Output in Keycloak - CVE-2021-20323

Published: April 25, 2022 / Updated: June 29, 2026


Vulnerability identifier: #VU135685
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:U/U:Green
CVE-ID: CVE-2021-20323
CWE-ID: CWE-116
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: Keycloak
Affected software:
Keycloak

Detailed vulnerability description

The vulnerability allows a remote attacker to execute arbitrary script in the user's browser.

The vulnerability exists due to improper encoding or escaping of output in the client registration endpoint when handling a malicious POST request. A remote attacker can send a specially crafted request to execute arbitrary script in the user's browser.


How to mitigate CVE-2021-20323

Install security update from vendor's website.

Sources