CVE-2022-3916 | Keycloak: session takeover with oidc offline refreshtokens

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.

Published: 2023-09-20 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2022-3916 is rated Moderate Risk (42.8/100): CVSS Medium severity, with low exploitation likelihood (EPSS 0.23%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2022-3916

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2025-11-21 0.54% 0.23% -0.32%
2 2025-11-18 0.23% 0.54% +0.32%
3 2025-03-30 0.23%

Full EPSS history (9 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2022-3916

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
6.8 3.1 MEDIUM
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
1.6 5.2 [email protected]
6.8 3.1 MEDIUM
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
1.6 5.2 [email protected]

Weakness enumeration for CVE-2022-3916

GitHub Security Advisory for CVE-2022-3916

GHSA-97g8-xfvw-q4hg · Severity: medium · Ecosystem: maven — Keycloak vulnerable to session takeover with OIDC offline refreshtokens

OS Trackers for CVE-2022-3916

vendor priority summary link
redhat medium https://access.redhat.com/security/cve/CVE-2022-3916

Affected software / configurations for CVE-2022-3916

Vendor Product Version Raw CPE
redhat keycloak < 20.0.2 cpe:2.3:a:redhat:keycloak:*:*:*:*:*:*:*:*
redhat single_sign-on cpe:2.3:a:redhat:single_sign-on:-:*:*:*:text-only:*:*:*
redhat single_sign-on 7.6 cpe:2.3:a:redhat:single_sign-on:7.6:*:*:*:*:*:*:*
redhat openshift_container_platform 4.9 cpe:2.3:a:redhat:openshift_container_platform:4.9:*:*:*:*:*:*:*
redhat openshift_container_platform 4.10 cpe:2.3:a:redhat:openshift_container_platform:4.10:*:*:*:*:*:*:*
redhat openshift_container_platform_for_linuxone 4.9 cpe:2.3:a:redhat:openshift_container_platform_for_linuxone:4.9:*:*:*:*:*:*:*
redhat openshift_container_platform_for_linuxone 4.10 cpe:2.3:a:redhat:openshift_container_platform_for_linuxone:4.10:*:*:*:*:*:*:*
redhat openshift_container_platform_for_power 4.9 cpe:2.3:a:redhat:openshift_container_platform_for_power:4.9:*:*:*:*:*:*:*
redhat openshift_container_platform_for_power 4.10 cpe:2.3:a:redhat:openshift_container_platform_for_power:4.10:*:*:*:*:*:*:*
redhat openshift_container_platform_ibm_z_systems 4.9 cpe:2.3:a:redhat:openshift_container_platform_ibm_z_systems:4.9:*:*:*:*:*:*:*
redhat openshift_container_platform_ibm_z_systems 4.10 cpe:2.3:a:redhat:openshift_container_platform_ibm_z_systems:4.10:*:*:*:*:*:*:*

References for CVE-2022-3916

URL Tags
https://access.redhat.com/errata/RHSA-2022:8961 Vendor Advisory
https://access.redhat.com/errata/RHSA-2022:8962 Vendor Advisory
https://access.redhat.com/errata/RHSA-2022:8963 Vendor Advisory
https://access.redhat.com/errata/RHSA-2022:8964 Vendor Advisory
https://access.redhat.com/errata/RHSA-2022:8965 Vendor Advisory
https://access.redhat.com/errata/RHSA-2023:1043 Vendor Advisory
https://access.redhat.com/errata/RHSA-2023:1044 Vendor Advisory
https://access.redhat.com/errata/RHSA-2023:1045 Vendor Advisory
https://access.redhat.com/errata/RHSA-2023:1047 Vendor Advisory
https://access.redhat.com/errata/RHSA-2023:1049 Vendor Advisory
https://access.redhat.com/security/cve/CVE-2022-3916 Vendor Advisory
https://bugzilla.redhat.com/show_bug.cgi?id=2141404 Issue Tracking Vendor Advisory
cvelogic Threat Intelligence