Skip to main content

Keycloak CVE-2026-9802

| EUVDEUVD-2026-32720 MEDIUM
Insufficient Session Expiration (CWE-613)
2026-05-28 secalert@redhat.com GHSA-v5g5-wwmp-jppw
6.8
CVSS 3.1 · Vendor: redhat
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Capture victim refresh token via phishing or interception
  2. Delivery
    Token revoked by user logout or admin action
  3. Exploit
    Attacker awaits or induces Keycloak server restart
  4. Install
    Server restart resets revocation timing state
  5. C2
    Replay revoked token against token endpoint
  6. Execute
    Receive valid access token
  7. Impact
    Access victim account and downstream resources

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V7 - Session Management Session expiration enforcement
Exploitation Conditions

Three concurrent conditions must be met for exploitation: (1) revokeRefreshToken=true must be explicitly enabled in the Keycloak realm configuration - this is not the default in all deployments and must be verified per realm; (2) persistent session storage (e.g., an external database or cache backend) must be configured rather than in-memory-only session handling; (3) the Keycloak server must undergo a restart after the refresh token was captured by the attacker but before the token's natural expiry. Additionally, the attacker must have already obtained a valid refresh token belonging to the target victim, meaning token capture is a prerequisite, not part of this exploit itself. CVSS UI:R reflects that the victim's prior authenticated interaction was required for the token to be issued and captured. Exploitation is therefore limited by: the requirement for prior token theft, dependence on a server restart event, the specific non-default realm configuration, and the need for the captured token to still be within its configured lifetime window at the time of replay.

Impact

The CVSS 6.8 (Medium) score reflects a constrained but non-trivial attack path. The vector AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N signals that exploitation requires high complexity - the attacker must have previously obtained a refresh token, and a server restart must occur within the window before the token's natural expiry. PR:N indicates the attacker does not require their own authenticated session on the Keycloak instance; however, UI:R confirms the victim's prior interaction was necessary for token capture. The confidentiality and integrity impacts are both rated High, reflecting the account takeover potential. No EPSS score was provided in the supplied intelligence, so probabilistic exploitation likelihood cannot be quantified from this data. The absence of a KEV listing and the AC:H complexity rating together suggest this is not a broadly automated threat, but is realistic in targeted scenarios (e.g., post-phishing token theft followed by an opportunistic or induced restart). The actual organizational risk is amplified if the affected Keycloak instance is a federated SSO gateway protecting numerous downstream applications, as a single token replay could cascade into multi-system access.

Exploit ScenarioDerived

An attacker intercepts or exfiltrates a victim's OAuth 2.0 refresh token - for example, via a prior phishing campaign, a compromised browser, or a man-in-the-middle on an insecure network segment. The token is later revoked (e.g., the user logs out or an admin revokes sessions), but a subsequent Keycloak server restart resets the internal revocation timing state. The attacker then presents the revoked token to the Keycloak token endpoint, which now evaluates it as valid, issuing a fresh access token and granting unauthorized access to the victim's account and any downstream resources protected by that identity.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 28, 2026

Refresh token replay in Keycloak allows a remote attacker who has previously captured a user's refresh token to reuse that token after it has been revoked, bypassing session expiration controls. The vulnerability surfaces specifically when revokeRefreshToken=true is configured alongside persistent session storage, and is triggered by a server restart that resets the internal timing mechanisms responsible for enforcing token revocation. Successful exploitation can yield full account takeover, information disclosure, or privilege escalation; no public exploit identified at time of analysis and the CVE does not appear in CISA KEV.

RemediationAI

No patched release version was identified in the provided intelligence data; the upstream fix version is not confirmed from the available references. Administrators should consult the Red Hat advisory (https://access.redhat.com/security/cve/CVE-2026-9802) and Bugzilla entry (https://bugzilla.redhat.com/show_bug.cgi?id=2482467) for a confirmed patch version and upgrade path. As an immediate compensating control, consider disabling persistent session storage if revokeRefreshToken=true is required - this eliminates the timing reset condition, though it forces all sessions to terminate on server restart, impacting user experience. Alternatively, if persistent storage cannot be removed, implement a post-restart operational procedure that forces global session invalidation (invalidating all outstanding refresh tokens), accepting that legitimate users must re-authenticate after each restart. Additionally, reducing refresh token lifetimes to the shortest value operationally acceptable limits the replay window. Minimizing unplanned or frequent server restarts through high-availability configurations reduces exposure frequency, though it does not eliminate the underlying flaw.

Affected Packages

maven org.keycloak:keycloak-services fix: 26.6.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in maven

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Keycloak is Red Hat's open-source Identity and Access Management platform implementing OAuth 2.0 and OpenID Connect. The revokeRefreshToken=true setting is designed to enforce single-use refresh tokens - each token is invalidated upon first use, preventing replay. This mechanism relies on internal server-side timing state to determine whether a presented token has already been consumed. CWE-613 (Insufficient Session Expiration) captures the root cause: when Keycloak is paired with a persistent session backend and the server process is restarted, that in-memory timing state is reset or not correctly rehydrated from the persistent store. As a result, previously revoked tokens appear unexpired and valid to the reconstituted token validation logic. The persistence backend's record of issued tokens is present, but the revocation horizon is lost, creating a window where replayed tokens pass validation. No CPE string was included in the provided intelligence, so the specific affected Keycloak version range is not confirmed from this data.

Know when Build Of Keycloak gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (redhat) PRIMARY 6.8 MEDIUM
AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
Red Hat 6.8 MEDIUM

Primary rating from Vendor (redhat).

CVSS VectorVendor: redhat

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

DescriptionCVE.org

A flaw was found in Keycloak. When revokeRefreshToken=true is enabled and persistent session storage is in use, a server restart can reset internal timing mechanisms. This allows a remote attacker, who has previously captured a user's refresh token, to replay that token even after it has been revoked. Successful exploitation grants the attacker unauthorized access to the victim's account, potentially leading to information disclosure or privilege escalation.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 50 maven packages depend on org.keycloak:keycloak-services (22 direct, 28 indirect)

Ecosystem-wide dependent count for version 26.5.0.

Threat Intelligence Overview

EPSS Score
0.0%
Top 85% exploitable
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor CIRCL VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Total

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Affected Products (CPE)CVE.org

cpe:2.3:a:redhat:build_of_keycloak:-:*:*:*:-:*:*:*
CVE-2024-8883 MEDIUM POC
6.1 Sep 19

A misconfiguration flaw was found in Keycloak. Rated medium severity (CVSS 6.1), this vulnerability is remotely exploita

CVE-2026-3047 HIGH
8.8 Mar 05

Keycloak's SAML identity provider broker fails to enforce client disabled status during IdP-initiated SSO flows, allowin

CVE-2026-9704 HIGH
8.8 May 27

Privilege escalation in Red Hat Build of Keycloak allows low-privileged authenticated users to assume the permissions of

CVE-2024-1132 HIGH POC
8.1 Apr 17

A flaw was found in Keycloak, where it does not properly validate URLs included in a redirect. Rated high severity (CVSS

CVE-2026-3009 HIGH
8.1 Mar 05

Keycloak's IdentityBrokerService.performLogin endpoint fails to enforce disabled Identity Provider restrictions, allowin

CVE-2024-7885 HIGH
7.5 Aug 21

A vulnerability was found in Undertow where the ProxyProtocolReadListener reuses the same StringBuilder instance across

CVE-2024-7341 HIGH
7.1 Sep 09

A session fixation issue was discovered in the SAML adapters provided by Keycloak. Rated high severity (CVSS 7.1), this

CVE-2024-10234 HIGH
7.3 Oct 22

A vulnerability was found in Wildfly, where a user may perform Cross-site scripting in the Wildfly deployment system. Ra

CVE-2025-7784 MEDIUM
6.5 Jul 18

Privilege escalation in Keycloak's Fine-Grained Admin Permissions v2 (FGAPv2) allows administrative users with the manag

CVE-2024-4629 MEDIUM
6.5 Sep 03

A vulnerability was found in Keycloak. Rated medium severity (CVSS 6.5), this vulnerability is remotely exploitable, no

CVE-2024-7260 MEDIUM
6.1 Sep 09

An open redirect vulnerability was found in Keycloak. Rated medium severity (CVSS 6.1), this vulnerability is remotely e

CVE-2025-3910 MEDIUM
5.4 Apr 29

A flaw was found in Keycloak. Rated medium severity (CVSS 5.4), this vulnerability is remotely exploitable, no authentic

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy