Skip to content
Race condition Write-up Intermediate

Race Condition - Eating Rate Limits for Account Takeover

The login panel's rate limit was applied after checking credentials, so sending many login attempts at once let the attacker try more passwords than allowed. This allowed the attacker to find valid credentials and take over the account.

medium.com

Published on medium.com

Race condition vulnerability occurs when websites process requests concurrently. Race conditions typically occurs in multi-threaded or multi-process environments where multiple threads or processes are competing for shared resources.

Jerry Shah (Jerry), on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the rate limit counter was updated after credential validation, and concurrent requests were not synchronised, creating a race window.

Impact

The vulnerability allows attackers to bypass rate limits and identify the credentials of any user which ca lead to credential compromise and account takeover.

What the attacker needed

Access to the login panel; ability to send many requests in parallel

The fix

The rate limit counter should be incremented atomically before validating credentials, and shared resources should be locked to prevent parallel processing.

How it was found

  1. Intercept the login request and send it to Turbo Intruder.
  2. Load a modified script and paste a list of passwords.
  3. Launch the attack to send many requests in parallel.
  4. Observe that valid credentials are found.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A rate limit is a rule that stops you from trying to log in too many times, to prevent guessing passwords. Here, the website counted failed attempts only after checking the password, so if many attempts arrived at the same moment, they were all checked before the counter went up. This let the attacker guess many passwords at once and get into the account.

What is Race condition?

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.