WaratekVRT Sign in

CVE-2022-4361 Keycloak

Affected softwareKeycloak
Severity10.0 Critical CVSS 3.1 2 scores
Fixed in21.1.2
WeaknessCross-site scripting (CWE-79)
Published7 Jul 2023
Updated17 Jun 2026

Description

Keycloak, an open-source identity and access management solution, has a cross-site scripting (XSS) vulnerability in the SAML or OIDC providers. The vulnerability can allow an attacker to execute malicious scripts by setting the AssertionConsumerServiceURL value or the redirect_uri.

CWE-81

Exploitation status

No public exploit

No exploit has been reported in the sources we check. The 1 repository below are public GitHub repositories with fewer than 5 stars.

  • CISA KEV not listed
  • VulnCheck KEV not listed
  • CISA Vulnrichment exploitation: none
  • Indexed PoC 1 indexed, none at 5+ stars
  • EPSS 0.69% chance in 30 days

1 of these are GitHub repositories with fewer than 5 stars. They are listed for reference and don't count toward the exploitation status above.

IndexArtifactStarsFirst seen
GitHub PoC PoC for https://nvd.nist.gov/vuln/detail/CVE-2022-4361 2025-11-09

Waratek protection

Protected by Waratek

Waratek has a rule that blocks attacks on this vulnerability.

  • Protection full
  • Action available security rule
  • Review human Researcher
  • Record active
Decided by Manual classification of this CVE in the legacy dataset
Finding A manual classification set this CVE's status to Protected by Waratek.

How to mitigate CVE-2022-4361

Upgrade Keycloak to 21.1.2 or later. Until you can, Waratek RASP blocks exploitation with a security rule that blocks this kind of attack. It runs inside the Java application, with no code changes.

Waratek RASP Runtime protection for Java applications

CVSS

10.0 CRITICAL v3.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H 2 metrics

We show the highest score from the newest CVSS version. Scores from different versions can't be compared, and the first score listed is sometimes a 0.0 placeholder.

VersionScoreBandVectorAssignerType
CVSS 3.1 10.0 CRITICAL CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H secalert@redhat.com Secondary published
CVSS 3.1 6.1 MEDIUM CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N NVD Primary

Affected software and releases

Maven packages

Affected and fixed versions, from OSV.dev
PackageIntroducedFixedLast affected
org.keycloak:keycloak-services 0 21.1.2 unbounded

Products and versions

6 products, 10 version entries
SourceVendorProductSchemeAffected versions
osv org.keycloak keycloak-services generic < 21.1.2
nvd redhat keycloak generic < 21.1.2
nvd redhat openshift container platform generic 4.11 · 4.12
nvd redhat openshift container platform for ibm linuxone generic 4.9 · 4.10
nvd redhat openshift container platform for power generic 4.9 · 4.10
nvd redhat single sign-on generic any version · ≥ 7.6 and < 7.6.4

References

URLTags
https://github.com/keycloak/keycloak/security/advisories/GHSA-3p62-6fjh-3p5h WEB
https://github.com/keycloak/keycloak/commit/a1cfe6e24e5b34792699a00b8b4a8016a5929e3a WEB
https://bugzilla.redhat.com/show_bug.cgi?id=2151618 WEB
https://github.com/keycloak/keycloak PACKAGE

Timeline

Published2023-07-07By the CVE Program.
NVD record modified2026-06-17NVD's own last-modified date for this record.