Skip to content

Prevent passkey authentication for soft-deleted users#2557

Closed
depthfirst-app[bot] wants to merge 2 commits into
masterfrom
depthfirst_ca0b1547f77f5261458a6e91ca2ccb2c0e907ca7_51bc5a6e525fb336543098af32316e68
Closed

Prevent passkey authentication for soft-deleted users#2557
depthfirst-app[bot] wants to merge 2 commits into
masterfrom
depthfirst_ca0b1547f77f5261458a6e91ca2ccb2c0e907ca7_51bc5a6e525fb336543098af32316e68

Conversation

@depthfirst-app
Copy link
Copy Markdown
Contributor

@depthfirst-app depthfirst-app Bot commented Jun 1, 2026

Summary

Fix a broken authorization flaw in discoverable WebAuthn/passkey authentication.

Vulnerability

PasskeyAuthenticationVerify loaded the user from the WebAuthn userHandle and checked confirmation/banned state, but did not reject users with deleted_at set.

Impact

A softly deleted account that still had a registered passkey could successfully complete passkey verification and receive fresh refresh/access tokens.

Solution

  • Add an explicit deleted_at guard in internal/api/passkey_authentication.go before any token issuance logic.
  • Return user_not_found for soft-deleted users to avoid authenticating revoked accounts.
  • Add a regression test in internal/api/passkey_authentication_test.go to verify soft-deleted users are forbidden from passkey login.

🔍 View Vulnerability Details: Code Vulnerability

@depthfirst-app depthfirst-app Bot requested a review from a team as a code owner June 1, 2026 11:41
@fadymak
Copy link
Copy Markdown
Contributor

fadymak commented Jun 4, 2026

Closing in favour of the approach here: #2564

@fadymak fadymak closed this Jun 4, 2026
@fadymak fadymak deleted the depthfirst_ca0b1547f77f5261458a6e91ca2ccb2c0e907ca7_51bc5a6e525fb336543098af32316e68 branch June 4, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants