{"id":"CVE-2026-90997","state":"PUBLISHED","title":"Keycloak-services: keycloak: replay protection bypass leads to unauthorized access via database driver semantics mismatch","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.","publishedAt":"2026-09-17T18:47:34.059Z","updatedAt":"2026-09-25T06:42:50.534Z","severity":{"score":7.4,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","source":"redhat"},"assigner":"redhat","products":["Keycloak Keycloak","Red Hat Red Hat Build of Keycloak"],"affected":[{"vendor":"Keycloak","product":"Keycloak","packageName":"keycloak-services","defaultStatus":"unaffected","versions":[{"version":"26.7.0","status":"affected","lessThan":"26.7.4","versionType":"semver"}],"collectionURL":"https://github.com/keycloak/keycloak"},{"vendor":"Red Hat","product":"Red Hat Build of Keycloak","packageName":"rhbk/keycloak-rhel9","defaultStatus":"unaffected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:build_keycloak:"]},{"vendor":"Red Hat","product":"Red Hat Build of Keycloak","packageName":"rhbk/keycloak-rhel9-operator","defaultStatus":"unaffected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:build_keycloak:"]}],"references":["https://access.redhat.com/security/cve/CVE-2026-90997","https://bugzilla.redhat.com/show_bug.cgi?id=2533141"],"weaknesses":["CWE-294"],"ingestedAt":"2026-10-29T20:13:34.582Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/90xxx/CVE-2026-90997.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-90997","state":"PUBLISHED","datePublished":"2026-09-17T18:47:34.059Z","dateUpdated":"2026-09-25T06:42:50.534Z","assignerShortName":"redhat","assignerOrgId":"53f830b8-0a3f-465b-8143-3b8a9948e749","dateReserved":"2026-09-14T14:53:37.815Z"},"containers":{"cna":{"title":"Keycloak-services: keycloak: replay protection bypass leads to unauthorized access via database driver semantics mismatch","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"Keycloak","product":"Keycloak","packageName":"keycloak-services","defaultStatus":"unaffected","versions":[{"version":"26.7.0","status":"affected","lessThan":"26.7.4","versionType":"semver"}],"collectionURL":"https://github.com/keycloak/keycloak"},{"vendor":"Red Hat","product":"Red Hat Build of Keycloak","packageName":"rhbk/keycloak-rhel9","defaultStatus":"unaffected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:build_keycloak:"]},{"vendor":"Red Hat","product":"Red Hat Build of Keycloak","packageName":"rhbk/keycloak-rhel9-operator","defaultStatus":"unaffected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:build_keycloak:"]}],"references":[{"url":"https://access.redhat.com/security/cve/CVE-2026-90997","tags":["vdb-entry","x_refsource_REDHAT"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2533141","name":"RHBZ#2533141","tags":["issue-tracking","x_refsource_REDHAT"]}],"metrics":[{"other":{"content":{"value":"Important","namespace":"https://access.redhat.com/security/updates/classification/"},"type":"Red Hat severity rating"}},{"cvssV3_1":{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":7.4,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","version":"3.1"},"format":"CVSS"}],"problemTypes":[{"descriptions":[{"cweId":"CWE-294","description":"Authentication Bypass by Capture-replay","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"redhat","orgId":"53f830b8-0a3f-465b-8143-3b8a9948e749","dateUpdated":"2026-09-25T06:42:50.534Z"},"datePublic":"2026-09-16T14:21:23.000Z","x_redhatCweChain":"CWE-294: Authentication Bypass by Capture-replay","workarounds":[{"lang":"en","value":"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."}],"timeline":[{"lang":"en","time":"2026-09-14T14:53:20.409Z","value":"Reported to Red Hat."},{"lang":"en","time":"2026-09-16T14:21:23.000Z","value":"Made public."}],"credits":[{"lang":"en","value":"Red Hat would like to thank Bruno Oliveira of IBM in collaboration with OpenAI for reporting this issue."}],"x_generator":{"engine":"cvelib 1.8.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-09-21T21:07:40.908040Z","id":"CVE-2026-90997","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-09-21T21:07:53.300Z"}}]}}}