Dev.to Security 🔐 Cybersecurity 👁 0 📖 2 min read

No rate limit on your login? A 5-minute test for AI-built apps

Your login page works. But what happens if someone tries 10,000 passwords against it in ten minutes? In many AI-built apps, nothing stops them. The same goes for password reset, signup and any route that sends email or c

Your login page works. But what happens if someone tries 10,000 passwords against it in ten minutes? In many AI-built apps, nothing stops them. The same goes for password reset, signup and any route that sends email or calls a paid API.

That missing limit is called no rate limiting. It is easy to test and cheap to fix.

Who is at risk

Any app with a login, a reset-password form, an email-sending route or an AI feature that costs money per call. If you built it by prompting an AI tool and never asked about limits, assume there are none.

The 5-minute test (your own app only)

  1. Open dev tools, go to the Network tab, and submit your login form with a wrong password on a test account.
  2. Right-click the request and copy it as fetch or curl.
  3. Run it 20 times in a row, with the wrong password each time.
  4. Watch the status codes. If all 20 return the same "wrong password" answer, there is no limit. A good setup returns 429 (too many requests) or a lockout after a handful of tries.
  5. Repeat for password reset and any "send email" route. Use your own test address.

Only test an app you own, and use a test account.

What to fix

  • Login: limit attempts per account and per IP, for example 5 per 15 minutes, then slow down or lock for a while.
  • Password reset and email routes: limit per address and per IP. Otherwise strangers can use your app to spam people.
  • AI and paid API routes: require login and cap calls per user per day, so one visitor cannot run up your bill.
  • Return the same message for "no such user" and "wrong password", so attackers cannot learn which emails exist.
  • Use your platform's tools first. Most hosts and auth providers have a built-in limit setting. Turn it on before writing your own.

A prompt you can paste into your AI builder

"Add rate limiting to the login, signup, password reset and email-sending routes. Return HTTP 429 with a Retry-After header after 5 failed attempts in 15 minutes per account and per IP. Require authentication on every route that calls a paid API and cap it per user per day. Do not reveal whether an email exists."

Then run the test again to confirm it works.

What a scanner can and cannot tell you

An outside scan can spot some signs, like missing protective headers, but it will not hammer your login to prove there is no limit. That is a test you run yourself, on your own app.

I work on ProofForge. The free scan checks what a visitor can see, and the two-account test covers the signed-in half.

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.