Dev.to Security πŸ” Cybersecurity πŸ‘ 0 πŸ“– 2 min read

No rate limiting on login and signup: how AI-built apps get brute-forced (proofforge.live)

Rate limiting is the control AI-generated backends skip most often. The login route works, the signup route works, and nothing stops someone sending ten thousand requests to either. That means password guessing, SMS or e

Rate limiting is the control AI-generated backends skip most often. The login route works, the signup route works, and nothing stops someone sending ten thousand requests to either. That means password guessing, SMS or email bombing, scraping, and a surprise bill from a paid API behind your endpoint.

What to test on your own app

  1. Pick the routes that cost you something or guard something: login, signup, password reset, "send code", any endpoint that calls a paid API.
  2. Send a burst to your own app, for example 30 requests in a few seconds:
for i in $(seq 1 30); do curl -s -o /dev/null -w "%{http_code}\n" -X POST https://yourapp.com/api/login -d '[email protected]&password=wrong'; done
  1. Read the status codes. If you only ever see 401 or 200, nothing is limiting you. A working limit starts returning 429 Too Many Requests, often with a Retry-After header.

Only test apps you own, and keep bursts small.

Common gaps in generated code

  • Limits on the page but not on the API route behind it.
  • A limit keyed on IP only, so it breaks behind a proxy or is bypassed by changing headers.
  • Password reset and "resend code" left open while login is limited.
  • Serverless functions with no per-user cap on AI or email calls.

Fix

Put a limiter in front of the sensitive routes: Upstash Ratelimit or similar on Vercel and Next.js, express-rate-limit on Express, or Cloudflare rules in front of everything. Key on user or account where you can, not only IP. Return 429 with Retry-After, and add stricter limits to login, reset and code-send routes.

Check your own app from the outside, free. Run the free ProofForge scan on your live URL. No account needed for the first scan. It looks at your public site the way a stranger would and says pass, fail or inconclusive, so you know what is confirmed and what it could not see. One-time reports start at $9: see pricing. Building with an AI agent? There is an MCP server so it can check before it deploys.

πŸ“° Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.