Keycloak-services: keycloak: replay protection bypass leads to unauthorized access via database driver semantics mismatch
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Keycloak | Keycloak | unaffected |
|
||||||
| Red Hat | Red Hat Build of Keycloak | unaffected | — | ||||||
| Red Hat | Red Hat Build of Keycloak | unaffected | — |
No data.
No data.
| Vendor | Product | Versions | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Keycloak | Keycloak |
|
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.
No CVSS v4.0
No CVSS v3.0
No CVSS v2
This CVE is not in the KEV list.
Exploit prediction score: < 1% (0.396% probability within 30 days)
| Type | Values Removed | Values Added |
|---|---|---|
| References |
|
| 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 |
|
| Type | Values Removed | Values Added |
|---|---|---|
| Metrics |
ssvc
|
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Keycloak
Keycloak keycloak |
|
| Vendors & Products |
Keycloak
Keycloak keycloak |
| 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 |
|
| 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
|
cvssV3_1
|