The scanner says the login has no rate limit. Can the password actually be guessed? Brute force and rate limiting as a DAST finding (CWE-307): what the limit is keyed on, forwarded-header, username-spelling, second-route, batch, per-worker and parallel bypasses, the lockout that never sends a 429, one-time-code arithmetic, timing enumeration, and which fixes held

DedSec Security Research ·

Here is a hypothetical. A dynamic scan of a web application returns three results about its login.

The first is "No rate limiting on authentication endpoint", rated medium, on POST /api/account/login. The scanner sent twenty wrong passwords for its test account and got twenty 401 responses, none of them a 429. The second is informational, "Login is rate limited", on POST /login, the HTML form. The scanner's sixth wrong password got 429 Too Many Requests with a Retry-After header, and the team records the login as protected. The third is a medium on the second-factor step, POST /api/otp/verify: "No attempt limit on one-time code". The developer replies that codes expire after five minutes, so a six-digit code cannot be guessed in time, and the ticket is closed.

As elsewhere in this series, each decision rests on what the responses looked like, not on what they can prove. In our lab, built to reproduce the three shapes, twenty 401s with no 429 came from a handler that had locked the account after the fifth failure and answered every later attempt, the right password included, with the same 401. The scanner's "no rate limiting" was wrong, and the lockout it missed had made the account unusable for its owner. The form login that answered 429 on the sixth attempt shared its accounts with a JSON route and a GET route that had no limiter, and after the form's limit engaged, each of those still took 20 of 20 guesses, in every trial. And the one-time-code endpoint took 2,422 guesses a second from a single connection over loopback, which, if sustained, would try about 73 percent of the six-digit space inside one five-minute code lifetime.

This post is for whoever is holding a brute-force or rate-limit finding from a dynamic scan, or a "rate limited" result they are about to rely on. It covers:

It belongs to our series on confirming DAST findings; the series guide sets out the evidence classes the series uses. Three earlier posts sit next to this one. The GraphQL post measured an HTTP-level limiter that counted HTTP requests while each request carried many aliased login attempts, and the batching section here is the plain JSON version of the same mechanism. The race-condition post is about check-then-act handlers, and one of the bypasses below is a check-then-act race inside the limiter itself. The credential-exposure post covers what a leaked-credential alert tells you, which is the raw material of credential stuffing.

How we tested. Everything ran on 21 November 2026 on a virtual machine with two vCPUs, Ubuntu 24.04.4 and kernel 6.8.0, using Python 3.12.3 and its standard library, with nothing installed. One threaded http.server process hosted every single-process variant. Two more servers each forked four worker processes that accepted connections on one shared listening socket: one kept its counters in each process's memory, the other in a SQLite file all four shared. Everything listened on 127.0.0.1. On Linux the whole 127.0.0.0/8 range is loopback, so the harness bound its connections to other addresses in that range (127.0.0.2, 127.0.2.7 and so on) to act as distinct clients with real, distinct source addresses. Passwords were stored with PBKDF2-HMAC-SHA256 at 50,000 iterations, which took a median of 16.7 milliseconds per verification in-process on this machine; that cost is what makes the timing results look like a login rather than a dictionary lookup. Unless stated otherwise, a limiter allowed five failed attempts per key in a 60-second fixed window and then answered 429 with Retry-After: 60. The accounts were [email protected] with a known password, [email protected], and fifty [email protected] accounts.

The client was a Python harness on http.client, opening a new connection for every request unless stated. A cell is one limiter variant and one way of sending attempts, and each cell ran 20 trials, with the limiter state reset before each trial. Every count-based cell gave the same result in all 20 trials except where the text says otherwise. The machine was shared with an unrelated job during part of the run, which adds noise to the timings but not to the counts. One JSON file per experiment is archived with the lab, along with one thing we got wrong: our first run of the window and OTP experiments ran at about 25 requests a second on reused connections, because the toy server wrote headers and body in two writes and each response waited on Nagle's algorithm and a delayed acknowledgement. We set TCP_NODELAY and re-ran those experiments. The fixed-window count and the 1.5-second totals did not change. The sliding log's occasional 6 and the token bucket's occasional 10 appeared only in the faster re-run (the slower first run gave 5 and 9 in every trial), which fits the client-timestamp explanation given below.

This lab measures our own limiters, written to be wrong in specific ways. It is not a measurement of any API gateway, web application firewall, CDN, identity provider, framework middleware or CAPTCHA, and not of any scanner, ours included. The rates reflect a toy Python server on loopback, not any real deployment: a network adds latency to each request, while a faster server and more parallel connections add throughput, so measure the rate against your own system. The limits are small (five per minute) to keep the run short.

What "rate limited" has to specify

Missing or weak limits on login attempts are catalogued as CWE-307, Improper Restriction of Excessive Authentication Attempts. In the OWASP API Security Top 10 2023, permitting credential stuffing and brute force against authentication is one of the examples under API2:2023, Broken Authentication. Neither name tells you whether a particular login is protected, because a limiter has three properties, and a finding has to state all three before it means anything.

What it is keyed on. Source address, account, address and account together, session, device, or something global. Each key answers a different attack. A per-address limit slows one machine guessing many passwords or trying many accounts, and does nothing about many machines. A per-account limit slows guessing against one account from anywhere, does nothing about one guess each against many accounts, and gives anyone who knows a username the power to lock that account. The key also has to come from something the client cannot choose, and it has to be derived the same way the login derives identity. Both failed in our lab.

How the window counts. A fixed window counts within aligned intervals and resets at each boundary. A sliding window counts the last N seconds from now, either from a log of timestamps or by weighting two fixed windows. A token bucket holds up to a set number of tokens and refills at a steady rate. The three agree about the average rate and disagree about bursts.

What happens at the limit. A 429, which RFC 6585 defines for "too many requests in a given amount of time" and which may carry a Retry-After header. Or a 200 or 401 that looks like any other failure, a delay, a lockout until time passes or someone intervenes, or a CAPTCHA or another step. Only the first is visible to a scanner that compares status codes, and some of the others are what a careful implementation chooses on purpose, so that an attacker cannot tell whether the limit engaged.

For scale, NIST SP 800-63B as published in 2017 (section 5.2.2; since superseded by SP 800-63B-4) said the verifier "SHALL limit consecutive failed authentication attempts on a single subscriber account to no more than 100." A hundred is not five, and a finding is not about whether some number exists. It is about whether the number holds against the ways an attacker would actually send attempts.

What the scanner saw, and what it meant

Our scanner-shaped check: twenty wrong passwords for one account, from one address, on the route under test, then the right password.

Variant429 seenWrong attempts answered before the limitRight password afterwards
No limiterin 0 of 20 trials20200 in 20 of 20
Per address, client address taken from X-Forwarded-For or X-Real-IPin 20 of 20, at attempt 65429
Per address, from the socketin 20 of 20, at attempt 65429
Per address, cleared by any successful login from that addressin 20 of 20, at attempt 65429
Per account, keyed on the username as sentin 20 of 20, at attempt 65429
Per account, keyed on the normalised usernamein 20 of 20, at attempt 65429
Per address, mounted on the form route onlyin 20 of 20, at attempt 65429
Per address, counting HTTP requests on an endpoint that accepts batchesin 20 of 20, at attempt 65429
Per-account lockout with a generic errorin 0 of 20every response was the same 401401 in 20 of 20
Layered (the variant that held, described under fixes)in 20 of 20, at attempt 65429

Two things follow.

A 429 tells you the limiter fired for the requests you sent, keyed the way you happened to send them. Eight of the ten variants are indistinguishable in this check. Seven of those eight fell to at least one of the bypasses below, every time; one held against all of them. The check cannot tell which is which, because it never varies the thing the limiter is keyed on.

No 429 is not no limit. The lockout variant locked the account after the fifth failure, and from then on answered with the same 401 body a wrong password gets, without checking the password at all. A scanner looking for a 429 sees twenty identical 401s and reports "no rate limiting". What distinguishes this from an unlimited login is the right password, sent last: it failed in 20 of 20 trials. That is why the confirmation procedure below always ends with the known-good password, and it is also how a tester discovers the lockout's other cost, covered under denial of service. Timing shows it too: once the account locked, responses fell from about 16 milliseconds to about 1, because the handler stopped hashing.

Seven ways past a limiter that answers 429

Each section takes a limiter that returned 429 on the sixth attempt in the check above, or, for the multi-worker server, the same per-address limiter run as four processes, and sends the attempts differently.

The client chose its own address

Our ip-xff variant took the client address from the first entry of X-Forwarded-For, or from X-Real-IP if that was absent, and fell back to the socket. That is a common pattern for an application that sits behind a proxy. With a new random address in X-Forwarded-For on every request, it answered 20 of 20 wrong attempts and never sent a 429, in every trial. Rotating X-Real-IP did the same, 20 of 20. Under X-Forwarded-For rotation, the variant keyed on the socket address answered 5 of 20; the layered variant answered 5 of 20 under either header.

The mechanism is that these headers are written by whoever sends the request. A proxy appends the address it saw to the right of X-Forwarded-For; the left-most entry is whatever the client put there. Behind exactly one proxy you control, the right-most entry is the one that proxy wrote, and frameworks expose this as a setting for how many proxy hops to trust (Express's trust proxy, Werkzeug's ProxyFix with x_for). The standard Forwarded header from RFC 7239 has the same property. The Host header post covers forwarding headers from the other direction. A scanner that sends no forwarding headers gets the 429 and records the login as protected; the test is to send them.

The reverse mistake, which we did not test, is an application behind a proxy that trusts no header at all. Every client then shares the proxy's address, so one attacker's failures count against everyone.

The username was spelled differently

The login normalised usernames: Unicode NFKC, trimmed, lower-cased. We sent seven spellings of the victim's address, five wrong passwords each: as registered, a capital first letter, an upper-case domain, a leading space, a trailing space, all upper case, and a fullwidth v (U+FF56), which NFKC maps to v. All seven logged in with the right password. The user-raw variant keyed its counter on the username as sent, so each spelling got its own five, and it answered 35 of 35 wrong attempts. The variant keyed on the normalised username, and the layered variant, answered 5 of 35.

The limiter has to key on the identity the login resolves, after the same normalisation and lookup, not on the string in the request. The same applies when one account can be reached by email address, by username and by phone number: one counter per account, not one per identifier.

The attacker's own login reset the counter

Our ip-reset variant cleared an address's failure count on any successful login from that address, so that a user who mistypes twice and then gets in starts clean. The attacker owns an account too. Four wrong passwords for the victim, one correct login to [email protected], repeated six times: 24 of 24 wrong attempts were answered, and no 429 was ever sent. The variant keyed on the socket address without the reset, and the layered variant, answered 5 of 24. A successful login should clear the counter for the account that succeeded, and never a counter it shares with other accounts.

A second route reached the same check

Our route-split variant mounted the limiter on POST /login, the form. The same accounts could also log in through POST /api/login with a JSON body, as a mobile client might, and through GET /login?username=...&password=..., as a legacy integration might. After the form's limit engaged at 5 of 20, the JSON route answered 20 of 20 and the GET route 20 of 20. The layered variant counted all three routes against one key, so after the form used up the five, the JSON and GET routes answered 429 from their first attempt: 0 of 20 each.

A finding on one route is a finding about that route. Every path to the password check needs the same counter: API versions, mobile and partner endpoints, a legacy form, basic authentication on an API, and anything that logs in as a side effect, such as a password-change or reset flow that accepts the old password. The DAST coverage post is about routes a crawler never reaches, and a second login route is often one of them.

Many attempts in one request

Our batch variant accepted a JSON array of credentials on /api/login and counted HTTP requests that contained any failure. Six requests of ten credentials each: the first five requests evaluated 50 of the 60 credentials, and only the sixth got a 429. The layered variant counted each credential, and evaluated 5 of 60.

The status codes run backwards here. The layered variant answered 200 to all six HTTP requests and put the per-credential 429s inside the body; the vulnerable variant was the one that produced an HTTP 429. A check that reads status codes would have called the protected endpoint unlimited and the weak one protected. The GraphQL post measured the same mechanism with aliases, where many login mutations travel in one query.

Four workers, four counters

Our worker-mem server ran four processes, each with its own in-memory counter, as a limiter written into application code does when the application runs as several workers, containers or instances. With a new connection for every request, it answered 20 of 40 wrong attempts, and the responses came from all four workers, in every trial. Over one reused keep-alive connection, it answered 5 of 40, all from one worker. The server with the counter in a shared SQLite file answered 5 of 40 both ways.

So the limit a tester observes depends on how the tester's client reuses connections. A scanner that keeps one connection open measures one worker's limit; a client that opens a new connection each time gets one limit per worker. In this lab, 20 was exactly four times five in every trial, because the kernel spread new connections across the four processes; how evenly that happens depends on the server and the load balancer in front of it.

Twenty requests at once

Most of our variants used the most common shape for a login limiter: read the failure count, refuse if it is at the limit, verify the password, and record a failure if it was wrong. That is check-then-act. Between the read and the write, other requests read the same count. We opened twenty connections in advance and released twenty wrong attempts together. From a clean state, the per-address variant answered 20 of 20 in every trial, and the per-account variant answered 20 in 19 trials and 19 in one.

Then we put the right password at a random position in a burst of twenty. It succeeded in 20 of 20 trials against the per-address, per-account and lockout variants. The lockout that refused the right password after twenty sequential failures did not see a burst at all, because none of the burst's failures had been recorded when the others were checked. After five sequential failures, with the counter already at the limit, the same burst got the right password in 0 of 20 trials. So the race does not remove the limit. It resets what a window allows from five guesses to however many requests the attacker can get in flight together, once per window.

The layered variant reserved each attempt under a lock before verifying the password. It answered 5 of each burst of 20 in every trial, and the right password succeeded in 5 of 20 trials: the trials in which it happened to be among the first five to take a reservation. That is the limit working, not failing. A slow password hash, which is the right choice, widens the gap between check and act; the race-condition post covers the general mechanism.

Fixed, sliding and token-bucket windows at the edge

A second set of variants limited every request, not just failures, to five per second per address. We started each trial 0.2 seconds before a wall-clock second and sent requests as fast as one keep-alive connection allowed, for 1.5 seconds, recording which were allowed.

AlgorithmMost allowed in any one-second spanAllowed in 1.5 seconds
Fixed window, aligned to wall-clock seconds10, in 20 of 20 trials15
Sliding log of timestamps5 in 16 trials, 6 in 410
Token bucket, capacity 5, refilling 5 a second9 in 18 trials, 10 in 212

A fixed window allows twice its limit across a boundary. Five at the end of one window and five at the start of the next put ten inside one second, in every trial. An attacker can find the boundary by probing, or from a Retry-After that counts down to the reset (ours was a constant 60).

A token bucket allows its capacity plus its refill, so up to twice the steady rate in the first second, then the steady rate. That is not a defect. It is the burst the bucket was designed to allow, and it should be sized knowing that.

The sliding log's sixes are probably our measurement. The log never admits a sixth request within one second by the server's own clock. The harness timed each request at the client before sending it, so a request sent just inside the second can be admitted just outside it. We attribute the four sixes to that gap and did not verify it separately.

For a password login, the algorithm matters less than the totals: twice five a minute is still ten. It matters for one-time codes and for any limit sized tightly.

Lockout is a denial-of-service control an attacker can use

An attacker sent five wrong passwords for the victim from one address, and the victim then logged in with the right password from another. Then, from a fresh state, the attacker sent twenty wrong passwords from four addresses, five each.

VariantVictim's right password, after 5 from one addressAfter 20 from four addresses
Per address200 in 20 of 20200 in 20 of 20
Per account, 429 at the limit429 in 20 of 20429 in 20 of 20
Per-account lockout, generic error401 in 20 of 20401 in 20 of 20
Layered200 in 20 of 20429 in 20 of 20

A per-account limit is a switch anyone who knows a username can flip. Our lockout variant was set to lock for fifteen minutes (we did not wait it out), and because its failure count was never cleared, one more wrong password after expiry would lock it again. The layered variant counted failures per account and address pair, with a separate cap of twenty per account, so one address could not lock the owner out from elsewhere, and four addresses could. Any per-account cap has that property. The choice is what happens at the cap. A step-up, such as a CAPTCHA, an emailed link or a second factor, costs the owner less than a refusal does, and so does letting a device that has logged in before keep trying. We did not test any of those.

The per-address variant, which never locked the victim, has the opposite problem. From thirty addresses, one attempt each, it answered 30 of 30 wrong attempts against the victim's account. The per-account variant answered 5 of 30. The layered variant answered 20 of 30, and then the victim's own login failed in 20 of 20 trials: the account cap engaged, as designed, and the owner paid for it.

Credential stuffing is a different attack

Guessing tries many passwords against one account. Credential stuffing tries one password, usually leaked from another service, against each of many accounts. We sent one wrong password to each of fifty accounts.

VariantFrom one addressFrom ten addresses
Per account50 of 50 answerednot run
Per address5 of 5050 of 50
Layered20 of 50 (the address cap)50 of 50

No per-account limit sees stuffing, because no account sees more than one attempt. A per-address limit sees it only while the attacker has few addresses. The layered variant answered every attempt from ten addresses, because each address made five attempts and each account saw one. A rate limit bounds guessing; it does not stop a distributed attacker who holds correct passwords. The controls for that sit elsewhere: a second factor, rejecting passwords known to be breached (the credential-exposure post quotes NIST's blocklist guidance), and detection on login patterns. We tested none of them. A "no rate limiting" finding should say which attack it is about, because the evidence and the fix differ.

A delay that never refuses

Our tarpit variant slowed failures down instead of refusing them: after three failures on an account, each response waited 0.1 seconds, doubling per failure up to 1.6 seconds. Ten wrong passwords sent one after another took a median of 6.51 seconds (6.46 to 6.68). Ten wrong passwords sent together, with the account already at three failures, took a median of 0.23 seconds (0.17 to 0.34), and all ten were answered.

A delay inside the request handler slows each response. It does not limit how many responses are in progress at once, and the parallel requests read the failure count before any of them recorded a failure; the 0.23-second total is consistent with each of them sleeping for the first 0.1-second step only. A scanner sees slow responses and no 429, and may report "no rate limiting" or nothing. Neither is accurate: the delay throttles a client that waits for each answer, and not one that does not.

One-time codes: do the arithmetic

A six-digit code has 1,000,000 values. Against our variant with no attempt limit and a 300-second code lifetime, one keep-alive connection made 2,422 guesses a second over loopback. Four connections together made 1,768 a second, fewer than one; probably contention on two vCPUs with a threaded Python server; we did not investigate. The rate on your system could be lower or higher; the point is the arithmetic, which you can redo with a rate measured against your own system:

Then the caps. Our otp-percode variant allowed five guesses per code and refused further guesses until a new code was requested, and the resend endpoint issued a new code with a fresh count. Three codes and ten guesses each: 15 guesses were answered in every trial. A per-code cap that a resend resets gives five chances in a million per code, without limit on codes. At that rate, a 50 percent chance takes about 138,629 codes (ln 2 divided by -ln(1 - 5/1,000,000)). That is a lot of messages, each of which costs money and is visible to the owner, but nothing in the endpoint stopped it. Our otp-account variant capped failures per account across codes at ten: 10 of 30 guesses were answered in every trial. Ten guesses against a million values is one chance in 100,000 per cap period, and the length of that period is what sets the attacker's pace.

So for a code-verification finding, measure three numbers rather than looking for a 429: guesses allowed per code, whether a resend or a new login resets that count, and guesses allowed per account over a period. Then do the division. The resend endpoint needs its own limit, both for this reason and because each message has a cost.

Username enumeration through timing

Our unlimited login returned early when the username did not exist, without running the hash. Its status and body were identical either way: one generic 401. We sent 200 requests of each kind, interleaved.

VariantExisting account, wrong passwordAccount that does not existOne request classified by a threshold
Return early for unknown usersmedian 15.44 ms (10th to 90th percentile 13.26 to 19.71)median 1.00 ms (0.72 to 1.40)400 of 400 correct
Verify against a dummy hash for unknown usersmedian 15.95 ms (13.58 to 21.21)median 16.03 ms (13.65 to 20.91)196 of 400 correct

With the early return, a threshold halfway between the two medians, 8.22 milliseconds, sorted every single request correctly. With a dummy hash for unknown accounts, the same method was right 196 times out of 400, which is a coin toss. Response differences of this kind are CWE-204, Observable Response Discrepancy, and the timing form is CWE-208, Observable Timing Discrepancy. A generic error message does not prevent enumeration if the work behind it differs. Loopback is the easy case: over a network, jitter is larger and a single request may not be enough, but repeated requests average it away.

The lockout variant leaked in a second way. A locked account answered the right password in a median of 1.08 milliseconds, an existing account that was not locked answered a wrong password in 15.98, and an account that did not exist in 0.92. So before the lock, timing tells an attacker which accounts exist, and once the lock engages, it tells them the moment it did, which tells a guessing run when to move to the next account. Registration and password-reset endpoints often enumerate more directly; we did not test them.

Confirming a brute-force or rate-limit finding without harming production

  1. Agree the test with the owner in writing: which accounts, which endpoints, how many attempts, at what rate, during which hours, and who can release an account if the test locks it.
  2. Use test accounts you control, never a real user's, and never a shared or administrative account, whose lockout is an outage. Two are useful: one to attack, and one to log into as "the attacker's own".
  3. Record a baseline: one correct login and one wrong one, with status, body and response time.
  4. Send a small number of wrong attempts, the suspected limit plus a few, not thousands. Then send the right password. Record every status and every response time. If the right password fails, there is a lockout, whatever the status codes said.
  5. If a 429 appeared, find out what it is keyed on, a few requests at a time, recovering between steps by waiting out the window or asking the owner to reset: a new value per request in X-Forwarded-For, X-Real-IP and Forwarded; other spellings of the username; every other route and method that logs in; a batch, if any endpoint accepts one; a new connection per request against one reused connection; your own account's successful login between attempts; a second source address, if you have one.
  6. If no 429 appeared, look for the controls that do not use it: the right password last, response times that drop sharply (the handler stopped checking) or climb (a delay).
  7. Run a parallel test only with explicit consent, against a test account, once, with a burst a little larger than the limit.
  8. For one-time codes, use your own phone or inbox. Count guesses allowed per code, across a resend and per account, and do the arithmetic with a measured rate. Do not brute-force a real code in production.
  9. Clear lockouts and reset everything the test touched, and confirm the test accounts log in.

What to record: the endpoint, route and method; the limit observed and what it was keyed on; which variation changed the count, with the numbers; whether the right password worked at the end; the response-time medians; and how the accounts were restored.

Fixes that held, and fixes that did not

ChangeHeld againstDid not hold against
Address from the socket, not from forwarding headersheader rotation: 5 of 20thirty addresses: 30 of 30; a parallel burst: 20 of 20
Account key after the login's own normalisationspellings: 5 of 35; thirty addresses: 5 of 30a parallel burst: 19 or 20 of 20; stuffing: 50 of 50; the owner locked out in 20 of 20
Clearing the address counter on any successnothingthe attacker's own login: 24 of 24
A limiter on the form route onlythe form routethe JSON and GET routes: 20 of 20 each
Counting HTTP requestsone credential per requestbatches: 50 of 60
An in-memory counter in each of four workersone reused connection: 5 of 40a new connection per request: 20 of 40
A shared store, attempt reserved before the checkfour workers: 5 of 40 either waynot tested beyond this
Per-account lockout with a generic errorsequential guessinga parallel burst (the right password in 20 of 20); the owner locked out; timing showed the lock
A delay that never refusesa client that waits for each answerten in parallel in a median of 0.23 seconds
Layered: (account, address) 5, account 20, address 20, reserved atomically, one counter for all routes and batch items, no forwarding headersheaders, spellings, own-login reset, second routes, batches, bursts (5 per burst), one address against the ownerstuffing from ten addresses: 50 of 50; four addresses locking the owner out

What the held rows have in common:

And the rows that did not hold share one property: each limited the requests a particular client happened to send, and the attacker controls how requests are sent.

The static side

Some of this is visible in code. Find where the limiter is mounted and which routes it covers, compared with every route that calls the password check. Find what the key is built from: req.ip under Express's trust proxy setting, request.remote_addr under Werkzeug's ProxyFix, any direct read of X-Forwarded-For, X-Real-IP or Forwarded, and whether the username in the key passes through the same normalisation as the login lookup. Look for a counter held in a module-level dictionary or an in-process cache in an application that runs as several workers, for a counter incremented after the password verification rather than before it, for a success path that deletes a key shared with other accounts, for endpoints that accept arrays of credentials, and for a code-verification handler whose attempt count lives on the code rather than on the account. Static analysis can point at these; whether they matter depends on deployment facts, such as the proxy chain and the worker count, that the code does not contain. The SAST false-positives post covers why a pattern match is not a finding.

A triage checklist for a brute-force or rate-limit finding

QuestionIf the answer is no or unknown
Was the right password sent after the wrong ones?A silent lockout looks like no limit: the right password failed in 20 of 20 trials in our lab
Is a "protected" result based only on a 429?Seven of eight variants that returned one fell to a bypass
Were forwarding headers varied?A header-trusting limiter answered 20 of 20
Were other spellings of the username tried?A raw-string key answered 35 of 35
Were all login routes and methods tested?A second route answered 20 of 20
Were batched credentials tried, and were bodies read, not just status codes?A request-counting limiter evaluated 50 of 60; the protected one answered 200
Was a new connection used per request?One reused connection measured one worker's limit
Was a small parallel burst tried, with consent?The right password logged in during a burst in 20 of 20 trials
Does the finding say whether it is about guessing or stuffing?Per-account and per-address limits answer different attacks
Can a third party lock the owner out?Five requests did, in 20 of 20 trials, for both per-account variants
For codes: are guesses capped per account, across resends?A per-code cap answered 15 guesses over three codes
Do response times differ for unknown or locked accounts?A threshold classified 400 of 400 requests
Were accounts unlocked and restored afterwards?The test may have caused the outage it was testing for

FAQ

Does a 429 on the login mean it is protected against brute force? It means the limiter fired for the requests the scanner sent. In our lab, eight variants returned 429 on the sixth attempt and seven of them were bypassed every time, by forwarding headers, username spelling, the attacker's own login, a second route, batching or parallel requests. A per-address limiter run as four workers with in-memory counters also allowed four times its limit to a client that opened a new connection per request.

Does the absence of a 429 mean there is no rate limiting? No. A lockout that answers like a wrong password, or a delay, sends no 429. Send the right password after the wrong ones: in our lockout variant it failed in 20 of 20 trials.

Is X-Forwarded-For safe to use as the client address for rate limiting? Only the entries your own proxies appended. The left-most entry is chosen by the client, and a limiter keyed on it answered 20 of 20 attempts with a new value per request.

Should a login lock accounts after failed attempts? A per-account refusal lets anyone who knows the username lock the owner out; five requests did it in 20 of 20 trials. Counting per account and address pair, with a step-up rather than a refusal at an account-wide cap, reduces that cost.

How long does it take to brute-force a six-digit one-time code? It depends on the guess rate and the caps. Our uncapped endpoint took 2,422 guesses a second over loopback, which, if sustained, would cover about 73 percent of the space in a 300-second lifetime. With ten guesses per account per period, it is one chance in 100,000 per period.

Can rate limiting stop credential stuffing? Not against an attacker with many addresses. Our layered limiter answered 50 of 50 one-guess attempts across fifty accounts from ten addresses, as its limits allowed. Stuffing needs other controls, such as a second factor and breached-password checks.

Does a generic login error prevent username enumeration? Not when the server does different work. With an identical 401 for both cases, response time alone classified 400 of 400 requests correctly in our lab, until unknown accounts were checked against a dummy hash.

What this post did not measure

We measured our own limiters in Python 3.12.3 over loopback on two vCPUs. We did not test any API gateway, CDN, web application firewall or framework rate-limiting library, a shared cache such as Redis, HTTP/2 or connection coalescing, a real network, CAPTCHA, device recognition, step-up challenges, IPv6 address rotation, password-reset or registration flows, push-notification second factors, or the cost of sending codes. Nothing here measures any scanner, ours included.

The hypothetical findings, resolved

Where AppSecD fits

AppSecD's dynamic and API testing runs Nuclei, Dalfox, SQLMap, Commix, Katana, Arjun, FFuf and Interactsh for out-of-band detection, plus 150+ native checks and API discovery across 50+ web frameworks. Its policy-driven gating blocks a pull request or commit when it introduces a violation. Findings are deduplicated across scans, move through new, reopened and fixed states, and can require maker-checker approval before they are closed.

That is the whole claim. data/products.ts is the single source of truth for what these products do, and it does not mention rate limiting, brute force, account lockout, credential stuffing, one-time codes or username enumeration. So this post makes no claim that AppSecD tests for any of them. Nor does it claim anything about:

The mechanisms, measurements, confirmation procedure, fixes and checklist above are general practice that applies to any scanner's output, ours included. The scenario in this post is hypothetical and does not describe any deployment, user or finding.

More about AppSecD · All posts