You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: auth per-email attempt limiter is shared across proofs and counts before the credential check #461
main at d939969 (static source review; not executed against a deployment). Node/OS/deployment: not applicable.
Minimal reproduction
Reported by review, not independently reproduced. Exploit-level detail is intentionally omitted per SECURITY.md.
Weakness: the per-email attempt limiter is keyed only by the account email, and one key is shared by several independent proofs. It is incremented before the credential is checked. A third party who knows an address can therefore make that account's sign-in unavailable for the limiter window without knowing any credential.
login:<email> is charged by password sign-in, passkey sign-in, OIDC sign-in and step-up: packages/auth/src/auth-core.ts lines 921 (the attempt helper), 987, 1354, 1388, 1403, 1574, 1619.
The limiter itself: packages/auth/src/auth-store.ts lines 645-655 (fixed per-key ceiling, 429 authentication_rate_limited); the key is only cleared on success (line 887).
token:<email> is similarly shared by email-code issuance and password reset / verify-email tokens: auth-core.ts lines 1262 and 1431.
Relevant output
Expected: failed guesses against one proof, from one client, cannot deny a different proof or a different client for the same account.
Suggested fix
Key the tight limiter by email and client (network/device), and keep a separate, much higher per-email ceiling for distributed guessing.
Do not let failed passwords consume the budget for passkey or OIDC proofs (those are not guessable secrets).
Split token:<email> so reset and email-code issuance do not share one budget.
Ship default per-client limits in the presets so operators get the protection without configuration.
Activity
fix(auth): close account-enumeration, rate-limit and flow-binding gaps
fix(auth): close account-enumeration, rate-limit and flow-binding gaps