Skip to content

[Bug]: password reset leaves the account-wide password attempt budget in place #546

Closed

Description

@jimhoyd

Runtime revision and environment

main at 645239b (static source review plus local synthetic checks). Node 22/26, macOS. Deployment: not applicable.

Minimal reproduction

b5582f3 moved password-login attempt keys to login:password:<email> (account-wide) and login:password:<email>:client:<ip> (packages/auth/src/auth-core.ts:1019-1022, :1100). The reset path in packages/auth/src/auth-store.ts:1025 still deletes the old key urlcode-auth-attempt:login:<email>, which is no longer written.

Expected: after a successful password reset the owner can sign in immediately.
Actual: if a distributed attacker exhausted the account-wide budget, the owner stays locked out for the rest of the 15-minute window even with the new password.

Relevant output

grep -n "urlcode-auth-attempt:login:" packages/auth/src — only the stale key in auth-store.ts.

Suggested fix

Delete the hash of urlcode-auth-attempt:login:password:<email>. Client-scoped keys only hold that client's own failures, so they need not be cleared. A fix is prepared on branch claude/code-review-cleanup-a14e90; it needs a regression test that locks the account-wide budget, resets, and signs in.

Activity

  1. added
    bug
    extension
    on Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugextension

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions