Skip to content
Business logic Write-up Intermediate

Finding Bugs Beyond the Obvious: A Rate Limit Bypass Story

The authentication endpoint auth.target.com did not consistently enforce rate limiting after five failed login attempts, unlike the main site. An attacker could brute-force credentials and distinguish correct ones by a different response length and a 400 status requesting a 2FA code.

medium.com

Published on medium.com

Hello everyone! Welcome to my blog, where I’ll share a unique finding from my bug bounty journey.

Dev Rawal, 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 backend authentication service did not share or enforce the same rate-limiting logic as the front-end, and its error responses differed for valid versus invalid credentials.

Impact

An attacker could brute-force user credentials without being reliably rate-limited, and could identify valid credentials by a distinct response that requested a 2FA code sent to the victim's email.

What the attacker needed

Access to the login page; ability to send many requests

The fix

The authentication endpoint should enforce the same rate limiting as the main site and return uniform error responses that do not reveal whether credentials are valid.

How it was found

  1. Log in with correct credentials, then log out, then try incorrect credentials while capturing requests in Burp.
  2. Notice that after five failed attempts the main site shows a rate-limit message.
  3. Send the authentication request from auth.target.com to Repeater and remove unnecessary headers and cookies.
  4. Forward the request to Intruder and start a brute-force attack.
  5. Observe inconsistent rate limiting and different response lengths for correct credentials, including a 400 status asking for a 2FA code.

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 cap on how many times you can try something, like guessing a password, in a short period. Here, the main website stopped you after five tries, but the separate login service behind it did not, so someone could keep guessing passwords. The service also gave a different reply when a guess was correct, which helped the attacker spot it.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.