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.
Published on medium.com
Hello, hackers! I hope you’re having a great day.
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
- Register an account and go to the login page.
- Observe that after 10 requests the WAF blocks the IP.
- Try different headers such as X-Forwarded-Host, X-Real-IP, X-Original-IP, and X-Forwarded-For.
- 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.