Skip to content

[Bug] Auth endpoints /auth/signup and /auth/login have no rate limiting #1027

@Pcmhacker-piro

Description

@Pcmhacker-piro

Description

The POST /auth/signup and POST /auth/login endpoints have zero rate limiting. An unauthenticated attacker can repeatedly hammer these endpoints to:

  • Enumerate valid email addresses (signup returns "Email already exists" vs login returns "Invalid credentials" with different timing or behavior)
  • Conduct credential stuffing / brute force attacks against known accounts
  • Waste server resources

Affected Files

  • backend/app/routers/auth.py:18signup endpoint
  • backend/app/routers/auth.py:40login endpoint

Expected Behavior

Apply per-IP rate limits to auth endpoints (e.g., 5 attempts per minute per IP using slowapi or a custom middleware). Return 429 Too Many Requests when the limit is exceeded.

Labels

type:bug, level:intermediate, gssoc2026

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions