Skip to main content

Keycloak CVE-2025-12110

MEDIUM
Insufficient Session Expiration (CWE-613)
2025-10-23 secalert@redhat.com
5.4
CVSS 3.1 · Vendor: redhat
View

Attack ChainAIDerived

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

  1. Access
    Obtain offline refresh token via offline_access
  2. Exploit
    Admin removes scope expecting revocation
  3. Execution
    Keycloak still accepts stale refresh token
  4. Impact
    Mint new access tokens, retain unauthorized session

Vulnerability Assessment

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

Exploitation requires the attacker to already hold a valid offline refresh token issued while the client had the offline_access scope granted (TOKEN_TYPE_OFFLINE), and is only meaningful after an administrator removes the offline_access scope from that client expecting sessions to be revoked. It is therefore not remote-unauthenticated: the limiting factors are prior legitimate acquisition of an offline token (PR:L), a specific administrative scope-removal action as the triggering event, and the fact that the window is bounded by the offline session's normal lifetime/idle timeout. No special network configuration is needed, but the flaw cannot be triggered against a client that never issued offline tokens.

Impact

This is a medium-severity (CVSS 5.4) session management flaw (CWE-613, Insufficient Session Expiration) in Keycloak, and the signals consistently point to a low-urgency, defense-in-depth issue rather than an active priority. The CVSS vector (AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N) indicates network-reachable, low-complexity exploitation but requires existing low-level privilege (PR:L) - the actor must already be a legitimate user who previously obtained an offline refresh token. EPSS is low at 0.30% (21st percentile), there is no CISA KEV listing, and no public exploit has been identified, so there is no evidence of weaponization. The signals do not conflict: a low EPSS, absence of KEV, and a modest CVSS with partial C/I impact all align on a scenario of lingering valid sessions rather than remote code execution or privilege escalation. The real risk is operational/governance: an administrator who removes the offline_access scope reasonably assumes offline sessions are revoked, but they persist - meaning deprovisioning and access-revocation workflows silently fail. The input Tag 'Information Disclosure' understates the nature of the flaw, which is really unexpected session persistence; treat the tag as approximate.

Exploit ScenarioDerived

A user (or compromised account) obtains an offline refresh token from a client configured with the offline_access scope. An administrator later removes the offline_access scope from that client, believing all offline sessions are now invalidated, but the previously issued refresh token continues to be accepted and can be exchanged for fresh access tokens indefinitely. No public exploit code or active exploitation has been reported; exploitation simply requires retaining a token issued before the scope change.

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

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

Alert me

AnalysisAIv1 – Oct 18, 2026

Keycloak continues to honor OIDC offline sessions after an administrator removes the offline_access client scope, so a previously issued offline refresh token is still accepted at the token endpoint and can mint new access tokens. Affected are Keycloak deployments (including Red Hat build of Keycloak and RH-SSO via the referenced errata) where clients have been granted offline access; an attacker must already hold a valid offline refresh token (authenticated, PR:L) and the flaw only manifests after the administrative scope removal that was intended to revoke that access. Impact is confidentiality and integrity limited (CVSS 5.4, CWE-613 Insufficient Session Expiration) and bounded by the offline session's idle/max lifetime; EPSS is only 0.30% (21st percentile), there is no CISA KEV entry, and no public exploit code was identified at time of analysis.

RemediationAI

Apply the vendor update containing the fix from keycloak/keycloak pull request #43790 by installing the current Keycloak release, or the Red Hat build of Keycloak / RH-SSO packages referenced in errata RHSA-2025:21370, RHSA-2025:21371, RHSA-2025:22088 and RHSA-2025:22089 (see https://access.redhat.com/security/cve/CVE-2025-12110). Because the patch only takes effect on new validations, upgrading alone does not invalidate tokens already outstanding, so after patching explicitly revoke offline sessions for any client whose offline_access scope was removed: use the admin console's session revocation or the admin REST API to remove offline user sessions/tokens for that client and force those integrations to re-authenticate. If immediate upgrade is not possible, the most effective compensating control is to delete the affected client's offline sessions rather than relying on scope removal, or to remove/disable the client entirely, at the cost of breaking legitimate long-lived device and service integrations that must then be re-onboarded. Lower-impact options include setting short realm-level Offline Session Idle Timeout and Offline Session Max Limited values so stale offline tokens age out quickly (trade-off: legitimate offline clients must refresh more often and may hit limits), and restricting or monitoring the token endpoint for refresh_token grants against clients that no longer carry the offline_access scope so that unexpected successful refreshes can be detected and alerted on. Note that simply removing the scope, without a patch or explicit session revocation, is not a valid mitigation for this CVE.

Affected Packages

maven org.keycloak:keycloak-services fix: 26.2.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 an OpenID Connect / OAuth 2.0 identity provider. When a client requests the offline_access scope, Keycloak marks the user session as an offline session and issues a refresh token of type TOKEN_TYPE_OFFLINE that survives browser logout and normal SSO session expiry, subject to separate offline idle/max timeout settings. The root cause is CWE-613: token validation paths did not re-check whether offline access was still authorized for the client. Before the fix, TokenManager.validateToken() and AccessTokenIntrospectionProvider.introspectionChecks() accepted an offline refresh token (and reported introspection as active) purely on session validity, without verifying that the offline_access scope was still present in the client's scope set. The upstream patch (keycloak/keycloak PR #43790) adds a UserSessionUtil.isOfflineAccessGranted() helper that rebuilds the client session scope context and checks for OAuth2Constants.OFFLINE_ACCESS; both the token endpoint and the introspection endpoint now return invalid_grant / inactive when an offline session exists but the scope has been revoked, and an integration test (offlineRefreshWhenNoOfflineScope) covers the scope-removal scenario. The vulnerability therefore exploits an inconsistency between administrative intent (scope removal = revoke) and actual session state, and it involves no memory-safety or injection primitive.

Know when 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 5.4 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
vuln.today AI 5.4 MEDIUM

Actor must already hold a legitimately issued offline token (PR:L) reached over the network (AV:N/AC:L); impact is continued unauthorized token access, giving low C and I, no availability effect.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
Red Hat 5.4 MEDIUM

Primary rating from Vendor (redhat).

CVSS VectorVendor: redhat

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

DescriptionCVE.org

A flaw was found in Keycloak. An offline session continues to be valid when the offline_access scope is removed from the client. The refresh token is accepted and you can continue to request new tokens for the session. As it can lead to a situation where an administrator removes the scope, and assumes that offline sessions are no longer available, but they are.

Blast Radius

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

Ecosystem-wide dependent count for version 26.2.3.

Threat Intelligence Overview

EPSS Score
0.3%
Top 79% exploitable
Prevalence
High
widely deployed open-source IAM, basis of Red Hat build of Keycloak
Data Quality
4 sources
Confidence: Medium

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.3%
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· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

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

Attack Technique

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

CVE-2023-48795 MEDIUM POC
5.9 Dec 18

The SSH transport protocol with certain OpenSSH extensions, found in OpenSSH before 9.6 and other products, allows remot

CVE-2014-3709 HIGH POC
8.8 Oct 18

The org.keycloak.services.resources.SocialResource.callback method in JBoss KeyCloak before 1.0.3.Final allows remote at

CVE-2023-6563 HIGH POC
7.7 Dec 14

An unconstrained memory consumption vulnerability was discovered in Keycloak. Rated high severity (CVSS 7.7), this vulne

CVE-2022-1466 MEDIUM POC
6.5 Apr 26

Due to improper authorization, Red Hat Single Sign-On is vulnerable to users performing actions that they should not be

CVE-2017-7474 CRITICAL
9.8 May 12

It was found that the Keycloak Node.js adapter 2.5 - 3.0 did not handle invalid tokens correctly. Rated critical severit

CVE-2026-76187 CRITICAL
9.8 Sep 15

Authentication bypass in the Apache Airflow Keycloak auth manager provider (apache-airflow-providers-keycloak below 0.10

CVE-2022-1245 CRITICAL
9.8 Jul 08

A privilege escalation flaw was found in the token exchange feature of keycloak. Rated critical severity (CVSS 9.8), thi

CVE-2019-14910 CRITICAL
9.8 Dec 05

A vulnerability was found in keycloak 7.x, when keycloak is configured with LDAP user federation and StartTLS is used in

CVE-2021-20195 CRITICAL
9.6 May 28

A flaw was found in keycloak in versions before 13.0.0. Rated critical severity (CVSS 9.6), this vulnerability is remote

CVE-2023-6134 MEDIUM POC
5.4 Dec 14

A flaw was found in Keycloak that prevents certain schemes in redirects, but permits them if a wildcard is appended to t

CVE-2022-0225 MEDIUM POC
5.4 Aug 26

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

CVE-2020-10770 MEDIUM POC
5.3 Dec 15

A flaw was found in Keycloak before 13.0.0, where it is possible to force the server to call out an unverified URL using

Vendor StatusVendor

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