Skip to content
Fencer Intel
critical 10.0

CVE-2022-4361 json

Keycloak vulnerable to cross-site scripting when validating URI-schemes on SAML and OIDC

published 3y ago modified 4mo ago also GHSA-3p62-6fjh-3p5h , EUVD-2023-1671

cvss
10.0
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.7%
EPSS 0.7% chance of exploitation in 30 days, percentile 53%
public exploits
0
none known

Summary

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.

Patch / fix

  • maven org.keycloak:keycloak-services 21.1.2
  • redhat keycloak 21.1.2
  • redhat single_sign-on 7.6.4
  • rh-sso7-keycloak red hat single sign on 7.6 18.0.8-1.redhat_00001.1.el9sso
  • rh-sso7-keycloak-server red hat single sign on 7.6 18.0.8-1.redhat_00001.1.el9sso
  • rh-sso7-keycloak red hat single sign on 7.6 18.0.8-1.redhat_00001.1.el8sso
  • rh-sso7-keycloak-server red hat single sign on 7.6 18.0.8-1.redhat_00001.1.el8sso
  • rh-sso7-keycloak red hat single sign on 7.6 18.0.8-1.redhat_00001.1.el7sso
  • rh-sso7-keycloak-server red hat single sign on 7.6 18.0.8-1.redhat_00001.1.el7sso

red hat advisories RHSA-2023:3885RHSA-2023:3884RHSA-2023:3883

Is CVE-2022-4361 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

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-2022-4361 updated cvss 8.1

RHSSO: XSS due to lax URI scheme validation

  • Red Hat Middleware Containers for OpenShift rh-sso-7/sso76-openshift-rhel8 7.6-24
    fixed: vendor fix RHSA-2023:3888
  • Red Hat Single Sign-On 7
    fixed: vendor fix RHSA-2023:3892
  • Red Hat Single Sign-On 7.6 for RHEL 7 Server rh-sso7-keycloak 18.0.8-1.redhat_00001.1.el7sso, rh-sso7-keycloak-server 18.0.8-1.redhat_00001.1.el7sso
    fixed: vendor fix RHSA-2023:3883
  • Red Hat Single Sign-On 7.6 for RHEL 8 rh-sso7-keycloak 18.0.8-1.redhat_00001.1.el8sso, rh-sso7-keycloak-server 18.0.8-1.redhat_00001.1.el8sso
    fixed: vendor fix RHSA-2023:3884
  • Red Hat Single Sign-On 7.6 for RHEL 9 rh-sso7-keycloak 18.0.8-1.redhat_00001.1.el9sso, rh-sso7-keycloak-server 18.0.8-1.redhat_00001.1.el9sso
    fixed: vendor fix RHSA-2023:3885

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

CISA SSVC

Exploitation
none
Automatable
yes
Technical impact
total
Assessed
last yr.

Exploit prediction

0.69% chance of exploitation in the next 30 days, higher than 53% of all scored CVEs (FIRST EPSS, 2026-11-09).

CVSS scores

assigned by version score vector
CNA 3.1 10.0 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
NVD 3.1 6.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
GitHub 3.1 10.0 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
maven org.keycloak:keycloak-services
<21.1.2
21.1.2

Affected products

  • keycloak keycloak

Classification

Weakness
  • CWE-81 Improper Neutralization of Script in an Error Message Web Page
  • CWE-79 Improper Neutralization of Input During Web Page Generation

References

Sources

Fencer Intel 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.