Skip to content
DoS Disclosed report Beginner

Denial of service using asciidoctor include::

Two AsciiDoc files that include each other via the include:: directive cause the request to time out and consume CPU, which a user could use to cause a denial of service affecting the site.

GitLab

Originally disclosed on GitLab

  • Fixed in 3 months
  • Disclosed after 3 months

⚠️ Please read the process on how to fix security issues before starting to work on the issue. Vulnerabilities must be fixed in a security mirror.

HackerOne report #2431562 by gudanggaramfilter on 2024-03-23, assigned to @kmorrison1:

Report | Attachments | How To Reproduce

Report

Summary

User can cause DoS to affect the entire site by using two .adoc files which include each other via include:: directive. Gitlab::Asciidoc::IncludeProcessor simplest mitigation - prevent all use of the include directive. This may have an adverse impact on existing users, and this number needs to be higher if we want to prevent cyclic imports. I think the main problem is with our particular processor https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/asciidoc/include_processor.rb , specifically with :include_allowed?

Steps to reproduce
  1. Create a.adoc and b.adoc files in repository (attached to report).
  2. Open the a.adoc or b.adoc file or endpoint https://gitlab.com/h1-domain-verification-txt/cukurukukngopibang/-/blob/main/b.adoc?format=json&ref_type=heads&viewer=rich

Impact

After 60 seconds (timeout) - the request fails. Meanwhile, on the server side, (one) CPU caught fire (verified against instance16.10.0-ce.0-0 and gitlab.com ).

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

How To Reproduce

Please add reproducibility information to this section:

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 include processor does not detect or prevent cyclic includes, allowing infinite recursion.

Impact

The request times out after 60 seconds and one CPU core is fully consumed, potentially affecting the entire site.

What the attacker needed

Ability to create files in a repository

How it was found

  1. Create two AsciiDoc files (a.adoc and b.adoc) in a repository.
  2. Open one of the files or access its blob endpoint with format=json&viewer=rich.

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.

AsciiDoc lets you include other files. If two files include each other, the server gets stuck processing them, using one CPU and making the request fail.

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.