Skip to content

[CVE-2026-118030] Concurrent credential updates - #55105

Open
mabartos wants to merge 1 commit into
keycloak:mainfrom
mabartos:KC-54414
Open

mabartos wants to merge 1 commit into
keycloak:mainfrom
mabartos:KC-54414

Conversation

@mabartos

Copy link
Copy Markdown
Member

…ltiple Concurrent Logins

Closes keycloak#54414

Signed-off-by: Martin Bartoš <mabartos@redhat.com>
@mabartos
mabartos requested a review from a team as a code owner November 12, 2026 13:41
Copilot AI balanced review requested due to automatic review settings November 12, 2026 13:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The security fix requires confirmation that concurrency tests pass across supported databases, especially MySQL/MariaDB, because locking and isolation semantics matter for both local and federated credential storage.

No open issues 🎉

What changed in this PR

Addresses #54414 by using conditional credential updates to prevent concurrent reuse of HOTP and recovery codes, and to preserve the validated WebAuthn credential snapshot during counter updates.

Changes:

  • Makes HOTP and recovery-code validation succeed only when the conditional update succeeds.
  • Uses the original credential snapshot for WebAuthn counter updates, including passwordless authentication.
  • Adds local and federated storage tests for concurrent validation, HOTP rollback, and WebAuthn counter handling.
File Description
tests/​base/​src/​test/​java/​org/​keycloak/​tests/​model/​CredentialConcurrencyTest.java Adds concurrency and credential-state regression tests.
services/​src/​main/​java/​org/​keycloak/​credential/​WebAuthnCredentialProvider.java Preserves the validated snapshot for conditional counter updates.
services/​src/​main/​java/​org/​keycloak/​credential/​RecoveryAuthnCodesCredentialProvider.java Consumes recovery codes through conditional updates.
services/​src/​main/​java/​org/​keycloak/​credential/​OTPCredentialProvider.java Advances HOTP counters through conditional updates.

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CVE-2026-118030] HOTP Race Condition — Single OTP Code Reused for Multiple Concurrent Logins

2 participants