Skip to content
WebCureby Swasti
High

No rate limits

Login, OTP and AI endpoints that can be hit a million times.

What it is

Endpoints that accept unlimited requests: login and OTP forms can be brute-forced, signup can be spammed, and AI endpoints can burn through your credits.

Why fast-built apps get it

Rate limiting isn't needed for a demo, so it's never generated. It only matters the day someone points a script at you.

Before and after the cure

app/api/otp/verify/route.tsVulnerable
export async function POST(req: Request) {
  const { phone, code } = await req.json();
  const ok = await db.otp.findFirst({ where: { phone, code } });
  // 6 digits, unlimited guesses: cracked in minutes
  return Response.json({ ok: !!ok });
}
app/api/otp/verify/route.tsCured
export async function POST(req: Request) {
  const { phone, code } = await req.json();
  const { success } = await limiter.limit(`otp:${phone}`); // 5 per 15 min
  if (!success) return new Response("Too many attempts", { status: 429 });
  const ok = await verifyOtp(phone, code); // expires after 5 minutes
  return Response.json({ ok });
}

What it can cost you

  • Accounts taken over by password or OTP guessing
  • A surprise bill from your AI, SMS or email provider
  • Your app slowed down or knocked offline

Check your own app

  • Submit your login form 50 times with a wrong password; are you ever blocked?
  • Check whether OTPs expire and lock after a few attempts
  • Look at the spend limits on your AI and SMS accounts

The cure

  • Rate-limit login, OTP, signup, password reset and AI routes
  • Expire OTPs and lock after a few failed attempts
  • Set hard spend caps with your AI, SMS and email providers

Does your app have this one?

We'll check this and every other loophole on your app, then give you the cure.

Talk to us on WhatsApp