Description
A flaw was found in Keycloak. When deployed in stateless mode with MySQL or MariaDB, a mismatch in row-count semantics between the database driver and Keycloak's application logic allows an attacker to bypass replay protection. This vulnerability enables an attacker who intercepts single-use security artifacts, such as JWT client assertions, DPoP proofs, or one-time password (TOTP) codes, to replay them. Successful exploitation grants unauthorized access to the token endpoint or login flow.
Published: 2026-09-17
Score: 7.4 High
EPSS: < 1% Very Low
KEV: No
Impact: Unauthorized access to token and login flows
Action: Apply Patch
AI Analysis

Impact

The vulnerability is a mismatch in row-count semantics between the database driver and Keycloak's application logic when operating in stateless mode with MySQL or MariaDB. This flaw allows an attacker who intercepts single-use security artifacts – such as JWT client assertions, DPoP proofs, or one-time password codes – to replay them. Successful exploitation grants the attacker unauthorized access to the token endpoint or login flow, enabling access to protected resources without legitimate credentials.

Affected Systems

The vulnerability affects deployments of Keycloak, the open‑source identity and access management solution, that are configured in stateless mode and use a MySQL or MariaDB database. Any installation of Keycloak running under these conditions is vulnerable, regardless of the specific minor or patch release, until a patch or upgrade is applied.

Risk and Exploitability

The CVSS score of 7.4 indicates a high severity of the flaw. The EPSS score is not available, and it is not listed in the CISA KEV catalog. The attack vector is inferred to be remote, as an attacker must intercept the one‑time security artifacts in transit or obtain them through other means. Because the flaw permits replay of sensitive artifacts, successful exploitation could lead to unauthorized authentication and access to protected endpoints. The risk is elevated for environments where stateless Keycloak is used with MySQL/MariaDB and where attackers have network visibility to capture the artifacts.

Generated by OpenCVE AI on September 18, 2026 at 06:48 UTC.

Remediation

Vendor Workaround

To mitigate this issue, configure the JDBC connection string for MySQL/MariaDB to explicitly set `useAffectedRows=true`. This ensures the database driver correctly reports affected rows, preventing the replay protection bypass. This mitigation is applicable only when Keycloak is deployed in stateless mode and utilizes MySQL or MariaDB as its database. A restart of the Keycloak service will be required for the configuration change to take effect.


OpenCVE Recommended Actions

  • Upgrade Keycloak to a version that contains the fix for the replay protection bypass.
  • If an upgrade is not immediately possible, disable stateless mode or switch to a supported database engine that does not suffer from the row‑count semantics mismatch.
  • Implement additional monitoring to detect repeated use of single‑use tokens or to enforce token revocation and replay protection in your environment.

Generated by OpenCVE AI on September 18, 2026 at 06:48 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 22 Sep 2026 19:30:00 +0000


Tue, 22 Sep 2026 19:00:00 +0000

Type Values Removed Values Added
Title Keycloak: Replay protection bypass leads to unauthorized access via database driver semantics mismatch Keycloak-services: keycloak: replay protection bypass leads to unauthorized access via database driver semantics mismatch
First Time appeared Redhat
Redhat build Keycloak
CPEs cpe:/a:redhat:build_keycloak:
Vendors & Products Redhat
Redhat build Keycloak
References

Mon, 21 Sep 2026 22:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Fri, 18 Sep 2026 07:45:00 +0000

Type Values Removed Values Added
First Time appeared Keycloak
Keycloak keycloak
Vendors & Products Keycloak
Keycloak keycloak

Thu, 17 Sep 2026 19:00:00 +0000

Type Values Removed Values Added
Title keycloak-services: Keycloak: Replay protection bypass leads to unauthorized access via database driver semantics mismatch Keycloak: Replay protection bypass leads to unauthorized access via database driver semantics mismatch
References

Thu, 17 Sep 2026 12:15:00 +0000

Type Values Removed Values Added
Description A flaw was found in Keycloak. When deployed in stateless mode with MySQL or MariaDB, a mismatch in row-count semantics between the database driver and Keycloak's application logic allows an attacker to bypass replay protection. This vulnerability enables an attacker who intercepts single-use security artifacts, such as JWT client assertions, DPoP proofs, or one-time password (TOTP) codes, to replay them. Successful exploitation grants unauthorized access to the token endpoint or login flow.
Title keycloak-services: Keycloak: Replay protection bypass leads to unauthorized access via database driver semantics mismatch
Weaknesses CWE-294
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.4, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N'}

threat_severity

Important


Subscriptions

Keycloak Keycloak
Redhat Build Keycloak
cve-icon MITRE

Status: PUBLISHED

Assigner: redhat

Published:

Updated: 2026-09-25T06:42:50.534Z

Reserved: 2026-09-14T14:53:37.815Z

Link: CVE-2026-90997

cve-icon Vulnrichment

Updated: 2026-09-21T21:07:48.577Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-09-17T19:17:06.740

Modified: 2026-09-22T19:16:56.183

Link: CVE-2026-90997

cve-icon Redhat

Severity : Important

Publid Date: 2026-09-16T14:21:23Z

Links: CVE-2026-90997 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-09-18T07:30:05Z

Weaknesses
  • CWE-294

    Authentication Bypass by Capture-replay