$750 Bug Bounty: Bypassing Password Reset Rate Limits via Header Spoofing
The password reset endpoint rate-limited requests by client IP taken from an unverified X-Forwarded-For header, so changing that header value reset the counter. An attacker could send unlimited automated reset requests, causing email flooding and potentially enabling token brute-force if tokens were weak.
Rate limiting is a fundamental defense mechanism designed to protect sensitive endpoints — such as login forms, password reset requests, and OTP verification paths — from brute-force and credential stuffing attacks. However, when rate-limiting logic relies on unverified HTTP headers to identify client IP addresses…
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 instead of using the actual connection address.
Impact
An attacker could automate thousands of password reset emails to target users, causing inbox flooding and operational disruption; if reset tokens were weak, bypassing the limit could also enable brute-force token harvesting.
What the attacker needed
Access to the password reset endpoint; ability to set custom HTTP headers
The fix
The issue was fixed by configuring reverse proxies to overwrite untrusted X-Forwarded-For headers and by basing rate limits on the validated socket connection IP and multiple dimensions such as target account.
How it was found
- Send repeated password reset requests to observe the 5-per-minute rate limit and 429 response.
- Send a request with an X-Forwarded-For header set to one IP value until the quota is exhausted.
- Change the X-Forwarded-For header to a different IP value and observe a 200 OK response instead of 429.
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 website limits how many password reset emails you can trigger, usually by counting requests from your IP address. Here the site believed a header the client can set freely, so the attacker just changed that header to look like a new IP each time. This let them send as many reset emails as they wanted.
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.