Medium

Keycloak vulnerable to session takeover with OIDC offline refreshtokens

  • Disclosed: 13.12.2022
  • Updated: 11.10.2026 11:22

An issue was discovered in Keycloak when using a client with the offline_access scope. Reuse of session ids across root and user authentication sessions and a lack of root session validation enabled attackers to resolve a user session attached to a different previously authenticated user.

This issue most affects users of shared computers. Suppose a user logs out of their account (without clearing their cookies) in a mobile app or similar client that includes the offline_access scope, and another user authenticates to the application. In that case, it will share the same root session id, and when utilizing the refresh token, they will be issued a token for the original user.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Java / Kotlin (Maven) org.keycloak:keycloak-parent < 20.0.2 20.0.2

References

CVSS score 6.8/10
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
Weakness (CWE)
CWE-287, CWE-304, CWE-488, CWE-613
Platform
Java / Kotlin (Maven)
Package
org.keycloak:keycloak-parent
Disclosed
13.12.2022
Updated
11.10.2026 11:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-97g8-xfvw-q4hg - CC BY 4.0

Vulnerability history: org.keycloak:keycloak-parent

All published vulnerabilities of this package (Java / Kotlin (Maven)), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (26) in the archive
Total entries
26
First → latest
05.2021 02.2026
Without a fix
6
Exploited in attacks
0

Severity breakdown

  • Critical 2
  • High 12
  • Medium 10
  • Low 2

Disclosures per year

  1. 2021: 1
  2. 2022: 22
  3. 2023: 1
  4. 2024: 0
  5. 2025: 0
  6. 2026: 2
Severity:
  1. High · 8.1 CVE-2022-4137 < 20.0.5 20.0.5
  2. Critical · 9.1 CVE-2022-3782 < 20.0.2 20.0.2
  3. Keycloak vulnerable to session takeover with OIDC offline refreshtokens this entry
    Medium · 6.8 CVE-2022-3916 < 20.0.2 20.0.2
  4. High · 7.5 CVE-2021-3513 < 13.0.0 13.0.0
  5. Critical · 9.8 CVE-2019-14910 >= 7.0.0, <= 7.0.1 no fix
  6. High · 8.3 CVE-2019-14909 >= 7.0.0, <= 7.0.1 no fix
  7. High · 7.5 CVE-2017-12159 < 3.4.0 3.4.0
  8. High · 7.2 CVE-2017-12160 < 3.3.0.Final 3.3.0.Final
  9. High · 8.1 CVE-2018-14657 < 4.6.0.Final 4.6.0.Final
  10. High · 7.1 CVE-2021-3461 < 14.0.0 14.0.0
  11. High · 7.5 CVE-2020-14366 < 12.0.0 12.0.0
  12. High · 7.5 CVE-2020-10758 < 11.0.1 11.0.1
  13. High · 8.3 CVE-2021-20222 >= 9.0.0, < 12.0.3 12.0.3

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.