Skip to content

[Bug]: auth registration still reveals whether an email has an account #548

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

Found by review; exploit-level detail (patterns, payload sizes, timings) is intentionally omitted per SECURITY.md. Follows #463.

(a) /register for an existing email returns a session cookie that was never persisted (packages/auth/src/auth-core.ts:1076-1082). A follow-up authenticated request (e.g. GET /account/csrf) distinguishes the two cases, contrary to packages/auth/docs/JSON-API.md:90.
(b) Plausible: in waitlist mode packages/auth/src/auth.ts:402-404 awaits the registration-attempt notice (up to 5 s) only for duplicates, a timing signal.

Related, by design but worth a decision: per-email sign-in code issuance (auth-core.ts:1556-1557, 20/day, and new codes invalidate in-flight ones at auth-store.ts:1464) has no per-client scope, so anyone can exhaust or cancel a victim's codes.

Relevant output

Code reading; (a) confirmed by trace, (b) not timed.

Suggested fix

(a) require verified signup for the non-enumerating contract or state the limit in JSON-API.md; (b) send the notice without awaiting it; (c) add a per-client scope to code issuance or document the trade-off.

Activity

  1. added
    bug
    extension
    needs-decision
    on Sep 23, 2026
  2. jimhoyd commented on Sep 23, 2026

    @jimhoyd
    CollaboratorAuthor

    Part (b) landed in #604 (#604): in waitlist mode, the reply to a duplicate registration no longer waits for the registration-attempt notice, closing that timing signal. Parts (a) (session cookie issued for an existing email on /register) and (b)'s per-client scope for sign-in code issuance still need a decision and remain open.

  3. jimhoyd commented on Sep 24, 2026

    @jimhoyd
    CollaboratorAuthor

    Triage decision: preserve the documented non-enumerating registration contract. A duplicate registration must return the same generic outcome as a new registration but must not mint a usable authenticated session. Add a bounded per-client scope to sign-in-code issuance alongside the existing per-email limit, so a third party cannot readily exhaust or invalidate another user’s codes. The remaining work is implementation and focused regression coverage; removing needs-decision.

  4. removed
    needs-decision
    on Sep 24, 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