Skip to content
Business logic Write-up Beginner

Bypass Rate-Limit via X-Forwarded-For

The login page rate-limited requests by IP address, blocking after 10 attempts. By adding an X-Forwarded-For header, an attacker could bypass the rate limit and make unlimited login attempts.

null.x.b1ty Follow

Published on medium.com

Hello, hackers! I hope you’re having a great day.

Snoop-dog, 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-limiting mechanism relied on the client-supplied X-Forwarded-For header to identify the source IP, allowing spoofing.

What the attacker needed

A free account; ability to set custom HTTP headers

How it was found

  1. Register an account and go to the login page.
  2. Observe that after 10 requests the WAF blocks the IP.
  3. Try different headers such as X-Forwarded-Host, X-Real-IP, X-Original-IP, and X-Forwarded-For.
  4. Use the X-Forwarded-For header to bypass the WAF.

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 logging in, to stop guessing attacks. The site was counting attempts per IP address, but it trusted a header called X-Forwarded-For that anyone can set to pretend to be a different IP. So the attacker could keep trying passwords without being blocked.

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.