CWE-840Weakness · CWE-840

CVE-2025-14559

MEDIUM · 6.5 CVSS v3.1 Published 2026-01-21
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
71/100
Remediation priority · Elevated
Remotely reachable Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
A flaw was found in the keycloak-services component of Keycloak. This vulnerability allows the issuance of access and refresh tokens for disabled users, leading to unauthorized use of previously revoked privileges, via a business logic vulnerability in the Token Exchange implementation when a privileged client invokes the token exchange flow.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · moderate confidence

Keycloak's token exchange implementation contains a business logic flaw that allows a privileged client to obtain valid access and refresh tokens for disabled users. When the token exchange flow is invoked, the system fails to properly validate that the target user account is still enabled before issuing new tokens, allowing previously revoked privileges to be exercised.

MitigationApply Keycloak updates or patches addressing the token exchange validation logic to ensure user enabled status is verified before token issuance. Consider implementing additional authorization checks in custom token exchange implementations.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
High
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify Keycloak installation version
    Check the Keycloak server version by reviewing the release notes, server logs on startup, or the built version information (typically found in /opt/keycloak/bin/kc.sh --version or the Keycloak admin console about section). Compare your version against the version where the fix was released.
    Affected if Running an unpatched Keycloak version where the token exchange validation flaw exists.
  2. Confirm token exchange is enabled
    In the Keycloak admin console, navigate to Client Policies or Client Configuration for any client that might perform token exchanges. Token exchange is typically an advanced protocol mapper or client capability. Check if any client has the 'Token Exchange' permission enabled in the client's settings or authorization settings.
    Affected if Token exchange feature is active and a privileged client can invoke the token exchange endpoint.
  3. Identify privileged clients with token exchange capability
    Review the Keycloak client configuration for clients that have token exchange permissions. Use the admin API (GET /{realm}/clients) or navigate to Clients in the admin console, then check each client's 'Advanced' or 'Authorization' settings for token exchange permissions.
    Affected if A client exists with token exchange permissions and can request tokens on behalf of other users.
  4. Check for disabled user accounts
    Use the Keycloak admin API (GET /{realm}/users?enabled=false) or navigate to Users in the admin console and filter by 'Disabled' status to identify accounts that have been disabled.
    Affected if There are disabled user accounts present in the realm.
  5. Verify token exchange to disabled user
    If token exchange is enabled and you have a privileged client, attempt a token exchange request targeting a known disabled user account. Use the token exchange endpoint (POST /{realm}/protocol/openid-connect/token with grant_type=urn:ietf:params:oauth:grant-type:token-exchange) with the disabled user's identifier as the requested subject.
    Affected if The token exchange successfully returns a valid access token and refresh token for a disabled user, indicating the vulnerability is present.

A user is affected if running a Keycloak version with the token exchange flaw, the token exchange feature is enabled, and the system returns valid tokens for disabled user accounts through the token exchange flow.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

From vendor data
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Apply Keycloak updates or patches addressing the token exchange validation logic to ensure user enabled status is verified before token issuance. Consider implementing additional authorization checks in custom token exchange implementations.

Have this fixed Scoped from the published advisory
  • Consultation4.0 h
  • Implementation8.0 h
  • Testing6.0 h
  • Review / QA2.0 h
20.0 hours of engineering $3,500
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,600.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2025-14559 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2025-14559 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data