The limit is five now, but it counts requests, not guesses, and the verify endpoint accepts many codes per request. One request carrying every code costs a single unit and tries the whole space.
The same screen for checking a short code, with a strict attempt limit.
You guessed the code in one request.
Why the solution worked
The limit is on requests while one request checks many codes, so the real number of attempts is unrelated to the request count. The fix is counting attempts, not requests, and capping how many codes a request may carry.
The root cause
The limit counts requests while a request carries many attempts. The root is measuring the wrong unit.
How the code is fixed
Count attempts, not requests, and cap the items per request.
Vulnerable code
limiter.increment(req.ip); // one unit per request
for (const code of req.body.codes) if (code === otp) return ok(); // many guesses, one unit
Safe code
if (req.body.codes.length > 1) return res.status(400).end(); // one guess per request
limiter.increment(account, req.body.codes.length); // count attempts, not requests
Impact in the real world
Counting requests instead of attempts allows exhaustive guessing in one request and bypasses every rate limit.
How defenders detect it
Defenders count every attempt, cap the number of items per request, and alert on requests carrying large lists.
Your workspace now has a Server logs tab: your own attack, as the defender saw it, with the alerting lines marked.
Solved with the walkthrough. Put it aside and solve again to earn the feather.