Skip to content
DoS Disclosed report Beginner

Denial of service in account statistics endpoint

The account statistics endpoint allowed an attacker to request an arbitrarily long time period with an hourly interval, causing a large amount of data to be returned in a single request. This could lead to a denial of service condition by overloading the backend.

apok Follow

Originally disclosed on HackerOne

  • Triaged in 33 hours
  • Fixed in 22 days
  • Paid in 22 days
  • Disclosed after 27 days

Summary by the program

On May 4th, 2016, apok reported a Denial of Service condition on our user account statistics endpoint, which returns information about a user's map views over a specified period of time.

An attacker could trigger a potential denial of service condition by changing the value of the interval query string parameter from day to hour then requesting a time period of several years. We decided to first remove the hour interval option to resolve this issue. After apok reported a DoS condition when requesting an early start period of May 1997 with interval=day, we then implemented a limit of one year for all requests to the statistics endpoint.

On May 26th, 2016 we closed this report after deploying the fix to our production servers.

Normally, Mapbox does not issue bounties on DoS related reports as we have rate limiting measures in place as well as automated monitoring alerts for potential DoS and brute force attacks. By contrast, this potential DoS condition would have been caused by a single request and would have evaded our rate limiting and monitoring measures. As a result, we decided to triage, fix, and award a bounty for this report.

Note that apok deleted their test accounts in order to invalidate the session cookies in the screenshots included in this report.

The report

Hi Mapbox, I know that your guidelines explicitly say that Denial of Service coinditions are not in scope and should not be attempted, but I maintained the testing between adequate parameters so as to not to create excessive load on your backend. I also sent an email to [email protected] prior to submitting this report and Alex Ulsh and he or she (Sorry, can't know which since Alex is a unisex name hahaha) told me that this could be an exception.

The vulnerability relies on the https://www.mapbox.com/core/statistics/v1/apokh11/account endpoint, it seems that by modifying the "period" parameter to an arbitrary value, the amount of data returned increases probably without any limit, furthermore, if the interval is set to "hour" instead of "day", it is possible to increase the amount of data returned even further. To avoid affecting the availability of the server, I limited my testing to a small period, which still returned around 350 kb of data.

The amount of data can also be increased if the end date of the period requested is set to a point in the future.

To reproduce:

  1. Create an account or login to an existing account.
  2. Access this URL: https://www.mapbox.com/core/statistics/v1/apokh11/account?interval=day&period=1461766083142%2C1462370883143&metrics=countries%2Cbrowsers%2Chosts%2Cmaps%2Cversion&services=mapview%2Ctile%2Cstatic%2Cgeocode%2Cpermanentgeocode%2Cdirections%2Csurface&_=1462370883155
  3. Observe that the amount of data returned is around 2.5 Kb.
  4. Modify the "interval" parameter to "hour" and the "Period" parameter to, for example "1451766083142,1462370883143"
  5. Observe that the amount of data returned increased to 372 Kb.

Not tested: If the period is long enough, the amount of time taken to answer the request will probably be increased as well.

Implication: A malicious individual could leverage this feature by asking for extended periods to cause high loads on the backend, which in turn could affect the availiability of the service.

Recommendation: Limit the period length to an amount established by the business logic, so as to mitigate the possibility of using this functionality with malicious intent.

Let me know if you require any additional tests and/or information. Kind Regards, Apok.

Attachments

Denial_of_Service_Condition_First_request.png
Denial_of_Service_Condition_First_request.png From the original on HackerOne
Denial_of_Service_Condition_First_response.png
Denial_of_Service_Condition_First_response.png
Denial_of_Service_Condition_Second_request.png
Denial_of_Service_Condition_Second_request.png
Denial_of_Service_Condition_Second_response.png
Denial_of_Service_Condition_Second_response.png

The original report as published on HackerOne, by apok. 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

Root cause

The endpoint did not limit the length of the requested time period or the number of data points returned, allowing a single request to demand an excessive amount of data.

What the attacker needed

A free account

How it was found

  1. Create an account or log in to an existing account.
  2. Access the statistics endpoint URL with a short period and daily interval.
  3. Observe that the response is small (around 2.5 KB).
  4. Change the interval to hourly and set a much longer period.
  5. Observe that the response size increases dramatically (to 372 KB).

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 denial of service is when a service becomes unavailable because it is overwhelmed. Here a single request could ask for statistics covering many years by the hour, making the server do a lot of work and return a huge amount of data, which could affect availability.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by apok

View all

5 more disclosed reports, best first.

More from Mapbox

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.