Keycloak Stateless Mode Replay Vulnerability (CVE-2026-90997)
A row-count mismatch in Keycloak when using MySQL or MariaDB in stateless mode allows attackers to bypass replay protection for single-use security artifacts like JWT client assertions, DPoP proofs, or TOTP codes.
CVE search metadata
CVE search record: CVE-2026-90997. Severity: high. CVSS: 7.4. KEV: no. Product: Keycloak (Stateless Mode). Brief: Keycloak Stateless Mode Replay Vulnerability (CVE-2026-90997). Brief link: https://feed.craftedsignal.io/briefs/2026-09-keycloak-replay-vulnerability/
CVE-2026-90997 is a security vulnerability in Keycloak that manifests when the application is configured in stateless mode while utilizing MySQL or MariaDB as the backend database. The issue arises from a semantic discrepancy in how row counts are handled by the database driver compared to Keycloak's internal application logic. This flaw permits the successful replay of single-use security artifacts that are intended to be consumed exactly once. An attacker capable of intercepting these artifacts - specifically JWT client assertions, DPoP proofs, or TOTP codes - can reuse them to gain unauthorized access to the token endpoint or bypass authentication flows. This vulnerability is critical for environments relying on stateless Keycloak deployments for identity and access management, as it undermines the fundamental security guarantees of one-time-use authentication mechanisms.
Impact
Successful exploitation of this vulnerability allows an attacker to bypass authentication protections, leading to unauthorized access to protected resources or elevated privileges within the identity provider. This poses a significant risk to organizations using Keycloak to secure API access or user logins, as an attacker with access to intercepted tokens can effectively masquerade as legitimate users or clients.
Recommendation
Prioritize the identification of all Keycloak deployments currently running in stateless mode that utilize MySQL or MariaDB backends. Evaluate available patches from the Keycloak project and apply them to all affected instances to remediate the underlying database driver logic mismatch. Since no specific IOCs are currently available, teams should monitor authentication logs for anomalous patterns of repeated token usage or multiple successful logins using the same short-lived authentication artifacts.
Immediate actions
Inventory all Keycloak deployments to identify instances using stateless mode with MySQL or MariaDB
Threat Hunt
Identify multiple authentication events utilizing identical short-lived tokens or security artifacts within a short timeframe
Data: Keycloak authentication logs, Token endpoint access logs
Mitigations
Monitor for patched releases of Keycloak and apply updates once available
CVE-2026-90997