Skip to content
Fencer Vulns
medium 6.8

CVE-2022-3916 json

Keycloak: session takeover with oidc offline refreshtokens

published 2022-12-13 3 y ago modified 2026-06-17 4 mo ago also GHSA-97g8-xfvw-q4hg , EUVD-2022-7575

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

Summary

A flaw was found in the offline_access scope in Keycloak. This issue would affect users of shared computers more (especially if cookies are not cleared), due to a lack of root session validation, and the reuse of session ids across root and user authentication sessions. This enables an attacker to resolve a user session attached to a previously authenticated user; when utilizing the refresh token, they will be issued a token for the original user.

Patch / fix

  • maven org.keycloak:keycloak-parent 20.0.2
  • Red Hat Red Hat Single Sign-On 7.6 for RHEL 7 0:18.0.3-1.redhat_00002.1.el7sso, 0:18.0.6-1.redhat_00001.1.el7sso
  • Red Hat Red Hat Single Sign-On 7.6 for RHEL 8 0:18.0.3-1.redhat_00002.1.el8sso, 0:18.0.6-1.redhat_00001.1.el8sso
  • Red Hat Red Hat Single Sign-On 7.6 for RHEL 9 0:18.0.3-1.redhat_00002.1.el9sso, 0:18.0.6-1.redhat_00001.1.el9sso
  • Red Hat RHEL-8 based Middleware Containers 7.6-15, 7.6-20
  • rh-sso7-keycloak red hat single sign on 7.6 18.0.6-1.redhat_00001.1.el7sso
  • rh-sso7-keycloak-server red hat single sign on 7.6 18.0.6-1.redhat_00001.1.el7sso
  • rh-sso7-keycloak red hat single sign on 7.6 18.0.6-1.redhat_00001.1.el8sso
  • rh-sso7-keycloak-server red hat single sign on 7.6 18.0.6-1.redhat_00001.1.el8sso
  • rh-sso7-keycloak red hat single sign on 7.6 18.0.6-1.redhat_00001.1.el9sso
  • rh-sso7-keycloak-server red hat single sign on 7.6 18.0.6-1.redhat_00001.1.el9sso
  • rh-sso7-keycloak red hat single sign on 7.6 18.0.3-1.redhat_00002.1.el7sso
  • rh-sso7-keycloak-server red hat single sign on 7.6 18.0.3-1.redhat_00002.1.el7sso

red hat advisories RHSA-2023:1043RHSA-2023:1044RHSA-2023:1045RHSA-2022:8961RHSA-2022:8963RHSA-2022:8962

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-3916 updated cvss 6.8

keycloak: Session takeover with OIDC offline refreshtokens

  • Red Hat Middleware Containers for OpenShift rh-sso-7/sso76-openshift-rhel8 7.6-15, rh-sso-7/sso76-openshift-rhel8 7.6-20
    fixed: vendor fix RHSA-2023:1047
  • Red Hat Single Sign-On 7
    fixed: vendor fix RHSA-2023:1049
  • Red Hat Single Sign-On 7.6 for RHEL 7 Server rh-sso7-keycloak 18.0.3-1.redhat_00002.1.el7sso, rh-sso7-keycloak 18.0.6-1.redhat_00001.1.el7sso, rh-sso7-keycloak-server 18.0.3-1.redhat_00002.1.el7sso, rh-sso7-keycloak-server 18.0.6-1.redhat_00001.1.el7sso
    fixed: vendor fix RHSA-2022:8961
  • Red Hat Single Sign-On 7.6 for RHEL 8 rh-sso7-keycloak 18.0.3-1.redhat_00002.1.el8sso, rh-sso7-keycloak 18.0.6-1.redhat_00001.1.el8sso, rh-sso7-keycloak-server 18.0.3-1.redhat_00002.1.el8sso, rh-sso7-keycloak-server 18.0.6-1.redhat_00001.1.el8sso
    fixed: vendor fix RHSA-2022:8962
  • Red Hat Single Sign-On 7.6 for RHEL 9 rh-sso7-keycloak 18.0.3-1.redhat_00002.1.el9sso, rh-sso7-keycloak 18.0.6-1.redhat_00001.1.el9sso, rh-sso7-keycloak-server 18.0.3-1.redhat_00002.1.el9sso, rh-sso7-keycloak-server 18.0.6-1.redhat_00001.1.el9sso
    fixed: vendor fix RHSA-2022:8963
  • Red Hat Single Sign-On 7.6.1
    fixed: vendor fix RHSA-2022:8965
  • Red Hat Middleware Containers for OpenShift rh-sso-7/sso7-rhel8-operator 7.6-7, rh-sso-7/sso7-rhel8-operator-bundle 7.6.1-8
    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

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
total
Assessed
2 y ago

Exploit prediction

0.95% chance of exploitation in the next 30 days, higher than 61% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

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

Affected packages

ecosystem package affected fixed in
maven org.keycloak:keycloak-parent
<20.0.2
20.0.2

Affected products

  • Red Hat Red Hat Single Sign-On 7
  • Red Hat Red Hat Single Sign-On 7.6.1
  • Red Hat Red Hat Single Sign-On 7.6 for RHEL 7
  • Red Hat Red Hat Single Sign-On 7.6 for RHEL 8
  • Red Hat Red Hat Single Sign-On 7.6 for RHEL 9
  • Red Hat RHEL-8 based Middleware Containers

Classification

Weakness
  • CWE-384 Session Fixation
  • CWE-613 DEPRECATED: Insufficient Session Expiration
  • CWE-287 Improper Authentication
  • CWE-304 Missing Critical Step in Authentication
  • CWE-488 Exposure of Data Element to Wrong Session

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.