What’s Vulnerable › Vulnerabilities
CVE-2022-3916: Keycloak: session takeover with oidc offline refreshtokens
- Severity: medium (CVSS 6.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.0% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2023-09-20 · updated 2026-06-17
- Weakness: CWE-384
Description
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.
Affected products
- Keycloak: before 20.0.2 — fixed in 20.0.2
- Red Hat OpenShift Container Platform 4.18: 4.9, 4.10
- RedHat Openshift Container Platform For Linuxone: 4.9, 4.10
- RedHat Openshift Container Platform For Power: 4.9, 4.10
- RedHat Openshift Container Platform Ibm Z Systems: 4.9, 4.10
- Red Hat Single Sign-On: 7.6
How to fix
Upgrade to a fixed version: Keycloak 20.0.2. Check the vendor advisory for mitigations.
References
- https://access.redhat.com/errata/RHSA-2022:8961
- https://access.redhat.com/errata/RHSA-2022:8962
- https://access.redhat.com/errata/RHSA-2022:8963
- https://access.redhat.com/errata/RHSA-2022:8964
- https://access.redhat.com/errata/RHSA-2022:8965
- https://access.redhat.com/errata/RHSA-2023:1043
- https://access.redhat.com/errata/RHSA-2023:1044
- https://access.redhat.com/errata/RHSA-2023:1045
- https://access.redhat.com/errata/RHSA-2023:1047
- https://access.redhat.com/errata/RHSA-2023:1049
- https://access.redhat.com/security/cve/CVE-2022-3916
- https://bugzilla.redhat.com/show_bug.cgi?id=2141404
Get alerted when CVE-2022-3916 or the next vulnerability affects your stack