Cve 2021 20323 The Xss Vulnerability In Keycloak
Keycloak's client registrations endpoint fails to sanitise an unknown attribute name in a POST request before reflecting it in an HTML error response. An attacker could craft a request containing a malicious script that executes in the victim's session, potentially across any realm.
Published on infosecwriteups.com
CVE-2021–20323 is a cross-site scripting (XSS) vulnerability discovered in Keycloak versions 10.0.0 to 18.0.0. This vulnerability is located in the client registrations endpoint, which is responsible for managing client applications within Keycloak.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application reflected an unsanitised unknown attribute name from a JSON POST request into an HTML error response.
Impact
An attacker could execute script in a victim's session and impersonate them, though the report notes there is no common path to exploit it with direct user impact.
What the attacker needed
Keycloak 10.0.0 to 18.0.0; POST request with Content-Type application/json; unknown attribute name in request
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Cross-site scripting (XSS) is when a website takes input from a user and puts it into a page without cleaning it first, so a malicious script can run in someone else's browser. Here, Keycloak's client registration endpoint reflected an unknown attribute name into an HTML error page, letting an attacker inject script. The report notes there is no common path to exploit it with direct user impact.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.