Race condition leads to add more than 5 email at Data breaches monitor system at https://stage.firefoxmonitor.nonprod.cloudops.mozgcp.net
The application limits users to five monitored email addresses, but concurrent requests to the add-email endpoint bypass this limit. An attacker can add more than five email addresses by sending many requests at once.
Originally disclosed on HackerOne
- Triaged in 45 hours
- Fixed in 19 months
- Disclosed after 19 months
Summary by the program
A race condition vulnerability is identified in Mozilla Monitor. The application is designed to limit users to adding a maximum of 5 email addresses for monitoring potential data breaches. However, due to the race condition, it is possible to bypass this restriction and add more than the intended limit of 5 email addresses. This vulnerability is exploited by rapidly sending multiple requests to add email addresses, taking advantage of the system's inability to properly synchronize these concurrent operations.
The report
Summary:
Hii
at https://stage.firefoxmonitor.nonprod.cloudops.mozgcp.net we can add emails for the monitor to check this are in data breach or not here have add email for the monitor limit a 5 we can't add more than 5 email
█████
Steps To Reproduce:
-
Visit https://stage.firefoxmonitor.nonprod.cloudops.mozgcp.net/user/settings -> add email and see you can add only 5 email
-
now capture the add email request
POST /api/v1/user/email HTTP/2
Host: stage.firefoxmonitor.nonprod.cloudops.mozgcp.net
Cookie: connect.sid=█████; _ga_CXG8K4KW4P=GS1.1.1679333065.1.1.1679336292.0.0.0; _ga=GA1.1.518394987.1679333065
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/111.0
Accept: text/html
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://stage.firefoxmonitor.nonprod.cloudops.mozgcp.net/user/settings
Content-Type: application/json
X-Csrf-Token: 0787d9f55701a244aa8f68401f2dc6aebb55a1b83ee2930743ba1324314b5c2cb87fafa7bac74afd8d4660feff2ce33d5b38fb949478c5b9f32430e863ced6b4
Content-Length: 33
Origin: https://stage.firefoxmonitor.nonprod.cloudops.mozgcp.net
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: same-origin
Sec-Fetch-Site: same-origin
X-Pwnfox-Color: blue
Te: trailers
{"email":"████████"}
-
send this to intruder -> add email list and start the attack
-
at the end you will able to add more than 5 emails
███
Impact
Race condition leads to add more than 5 email at Data breaches monitor system at https://stage.firefoxmonitor.nonprod.cloudops.mozgcp.net
thanks @sushantdh0pat
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
Root cause
Likely the check for the maximum number of emails and the insertion of a new email are not performed atomically, so concurrent requests can all pass the limit check.
Impact
An attacker could add more than the allowed five email addresses to the data breach monitoring system.
What the attacker needed
A user account on the staging site; ability to send concurrent requests
How it was found
- Visit the user settings page and confirm only five emails can be added normally.
- Capture the request that adds an email address.
- Send the captured request to an intrusion tool with a list of email addresses and start the attack.
- Observe that more than five emails are added.
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.
A race condition happens when a program checks a limit and then acts, but two requests can both pass the check before either one updates the count. Here, the site checks you have fewer than five emails, but if you send many requests at the same moment, several get through before the count is saved. This lets someone monitor more addresses than allowed.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.