Skip to content
Fencer Vulns
critical 9.6

CVE-2021-20195 json

keycloak Self Stored Cross-site Scripting vulnerability

published 2021-05-28 5 y ago modified 2026-06-17 4 mo ago also GHSA-q6w2-89hq-hq27 , EUVD-2021-1378

cvss
9.6
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
1.2%
EPSS 1.2% chance of exploitation in 30 days, percentile 69%
public exploits
0
none known

Summary

A flaw was found in keycloak in versions before 13.0.0. A Self Stored XSS attack vector escalating to a complete account takeover is possible due to user-supplied data fields not being properly encoded and Javascript code being used to process the data. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.

Patch / fix

  • maven org.keycloak:keycloak-core 13.0.0
  • redhat keycloak 12.0.3
  • keycloak Arch Linux 12.0.3-1

arch linux advisories AVG-1578

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-2021-20195 updated cvss 8.3

keycloak: The Account console allows stored self-XSS via impersonation mechanism

  • Red Hat Decision Manager 7 keycloak keycloak Red Hat Fuse 7 keycloak keycloak Red Hat Integration Camel K 1 keycloak keycloak Red Hat OpenShift Application Runtimes keycloak keycloak Red Hat Process Automation 7 keycloak keycloak Red Hat Single Sign-On 7 rh-sso7-keycloak rh-sso7-keycloak
    +1 more products
    Red Hat support for Spring Boot keycloak keycloak
    not affected: vulnerable code not present

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.25% chance of exploitation in the next 30 days, higher than 69% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
NVD 3.1 9.6 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
NVD 2.0 6.8 AV:N/AC:M/Au:N/C:P/I:P/A:P
GitHub 3.1 9.6 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
maven org.keycloak:keycloak-core
<13.0.0
13.0.0

Affected products

  • n/a keycloak

Classification

Weakness
  • CWE-20 Improper Input Validation
  • CWE-116 Improper Encoding or Escaping of Output
  • CWE-79 Improper Neutralization of Input During Web Page Generation

References

Sources

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.