Keycloak
CVE-2025-12110
MEDIUM
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain offline refresh token via offline_access
-
ExploitAdmin removes scope expecting revocation
-
ExecutionKeycloak still accepts stale refresh token
-
ImpactMint 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
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
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
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.
Primary rating from Vendor (redhat).
CVSS VectorVendor: redhat
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- 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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
The SSH transport protocol with certain OpenSSH extensions, found in OpenSSH before 9.6 and other products, allows remot
The org.keycloak.services.resources.SocialResource.callback method in JBoss KeyCloak before 1.0.3.Final allows remote at
An unconstrained memory consumption vulnerability was discovered in Keycloak. Rated high severity (CVSS 7.7), this vulne
Due to improper authorization, Red Hat Single Sign-On is vulnerable to users performing actions that they should not be
It was found that the Keycloak Node.js adapter 2.5 - 3.0 did not handle invalid tokens correctly. Rated critical severit
Authentication bypass in the Apache Airflow Keycloak auth manager provider (apache-airflow-providers-keycloak below 0.10
A privilege escalation flaw was found in the token exchange feature of keycloak. Rated critical severity (CVSS 9.8), thi
A vulnerability was found in keycloak 7.x, when keycloak is configured with LDAP user federation and StartTLS is used in
A flaw was found in keycloak in versions before 13.0.0. Rated critical severity (CVSS 9.6), this vulnerability is remote
A flaw was found in Keycloak that prevents certain schemes in redirects, but permits them if a wildcard is appended to t
A flaw was found in Keycloak. Rated medium severity (CVSS 5.4), this vulnerability is remotely exploitable, low attack c
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
NVD
CVE.org
EPSS
GitHub
Exploit-DB