Skip to content
DoS Disclosed report Beginner

Internal Server Error for too long/large response (mising offset or limit) for API parameter SCOPE

The search count endpoint on GitLab returned a 500 Internal Server Error and took over 30 seconds when a broad search term matched a very large number of results, because no limit or offset was applied. An attacker could send repeated such requests to consume server resources, potentially causing a denial of service.

GitLab

Originally disclosed on GitLab

  • Fixed in 2.2 years
  • Disclosed after 2.2 years

HackerOne report #761182 by marcin1985 on 2019-12-18, assigned to @jeremymatos:

NOTE! Thanks for submitting a report! Please replace all the (parenthesized) sections below with the pertinent details. Remember, the more detail you provide, the easier it is for us to triage and respond quickly, so be sure to take your time filling out the report!

If as logged user you will search using https://gitlab.com/search?repository_ref=&scope=&search=.&snippets= for value search=. (dot) you will see Internal Server Error for some /count?scope= if there is too many results. Theres no limit and query is too heavy (takes more than 30 seconds right now).

(Summarize the bug encountered concisely)

Steps to reproduce

(Step-by-step guide to reproduce the issue, including:)

  1. Log in as a user
  2. go to https://gitlab.com/search?repository_ref=&scope=&search=&snippets=
  3. If you have a lot of data try search for . (dot)
  4. You will see several Internal Server Errors in scopes where results are too large, in this example:

https://gitlab.com/search/count?repository_ref=&scope=projects&search=.&snippets=
https://gitlab.com/search/count?repository_ref=&scope=issues&search=.&snippets=
https://gitlab.com/search/count?repository_ref=&scope=merge_requests&search=.&snippets=

And the response for scope=projects takes more than 30 seconds.
5. Click on Projects tab results (it doesn`t display number like Projects 99+)

Actual result:
6. Page will be loaded long time (40 seconds or even more)
7. You will see 500 Internal server error (Something went wrong)

Impact

Someone can try DDOS attack for trying to search . from multiple requests.

What is the current bug behavior?

500 internal server error and too long response

What is the expected correct behavior?

limit response or try other tricks for optimize response

Impact

DDOS attack in worst case

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

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 search count query had no limit or offset and was too heavy to complete within the request timeout.

Impact

An attacker could send many such broad searches to consume server resources, potentially causing a denial of service.

What the attacker needed

A logged-in account; a large amount of searchable data

The fix

The response should be limited or the query optimised so it completes quickly.

How it was found

  1. Log in as a user.
  2. Open the search page with an empty repository reference and scope.
  3. Search for a very broad term such as a single dot when you have a lot of data.
  4. Observe Internal Server Errors on the count endpoints for scopes with too many results.
  5. Click the Projects tab and wait; the page loads for 40 seconds or more.
  6. See a 500 Internal Server Error.

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 website's search page often asks the server how many results exist so it can show a number like '99+'. Here that counting query had no cap, so a search matching almost everything made the server work for a very long time and then fail. Repeating such requests could tie up the server and slow it down for everyone.

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 from GitLab

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.