How I Broke the Speed Limit: A Bug Bounty Tale of Bypassing Rate
The login endpoint enforced rate limits per IP address by trusting the X-Forwarded-For header, which clients can set freely. An attacker could spoof a new IP on each request to bypass the limit and brute-force credentials or flood the endpoint.
Published on infosecwriteups.com
You know that feeling when you’re staring at a secure application, a masterpiece of security controls? Every endpoint you poke at seems ironclad — no SQL injection, no XSS, no misconfigurations.
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
The application trusted the client-supplied X-Forwarded-For header to identify the client IP for rate limiting, without validating it against trusted proxies.
Impact
An attacker could brute-force user credentials at scale and flood the endpoint, potentially causing denial of service or API abuse.
What the attacker needed
Access to the login endpoint; ability to set custom HTTP headers
The fix
The application should validate client IPs using trusted proxies and enforce rate limits server-side, adding CAPTCHA or progressive delays after failed attempts.
How it was found
- Send failed login attempts and observe a 429 response after five tries, with the limit resetting every 30 seconds.
- Change the source IP with a VPN and see the limit reset, confirming per-IP tracking.
- Modify the X-Forwarded-For header in Burp Repeater to a new value and send a sixth attempt, which is accepted.
- Automate requests with a script that sets a unique spoofed X-Forwarded-For value per attempt.
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 requests you can make in a period, used to stop password guessing. This site decided who you were by reading a header called X-Forwarded-For, which the client controls, so changing it made the site think each attempt came from a different computer.
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.