Skip to content
DoS Disclosed report Beginner

DOS via Gantt diagrams Mermaid

A denial-of-service vulnerability was found in GitLab's rendering of Mermaid Gantt diagrams when a comment contains dates spanning thousands of years. An attacker could make pages with such comments load very slowly, affecting any section that supports comments.

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 #2103067 by toukakirishima on 2023-08-09, assigned to @nmalcolm:

Report | Attachments | How To Reproduce

Report

Summary

Summary
I found a DOS vulnerability when add comment with Gantt diagrams Mermaid, as an attacker I can make DoS in any section with comments (Issues, Merge requests, Milestones, Snippets, Wiki pages, Markdown documents inside repositories, Epics). Due to the year timeline that must be loaded up to several thousand years in the future, attackers can create DOS with Gantt diagrams Mermaid.

Steps to reproduce
  1. Create comment with Gantt diagrams Mermaid (example on Issue)

Payload: (updated by nmalcolm)

```mermaid 
gantt
    title A Gantt Diagram
    dateFormat  YYYYY-MM-DD

    section Section
    A task           :a1, 99999-12-31,30d
    Another task     :a2, 00000-01-01, 25d
    Another one      :a3, 10000-12-31, 20d
```
image.png
image.png From the original on GitLab
  1. Reload the page. And you will load the page very long.
image.png
image.png From the original on GitLab
POC
bandicam_2023-08-09_17-48-00-090.mp4 From the original on GitLab
URL for Tested

https://gitlab.com/toukaattacker/aaa/-/issues/3

What is the current bug behavior?

Due to the year timeframe/timeline that must be loaded up to several thousand years in the future, attackers can create DOS with Gantt diagrams Mermaid.

What is the expected correct behavior?

Renders a maximum of 1-3 years of timeframe/timeline.

Output of checks

This bug happens on GitLab.com

Impact

Attacker can make DoS in any section with comments (Issues, Merge requests, Milestones, Snippets, Wiki pages, Markdown documents inside repositories, Epics).

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

Impact

An attacker could cause a denial of service in any section with comments, making pages load very slowly.

What the attacker needed

Ability to post a comment with a Mermaid diagram

The fix

The Gantt diagram renderer should limit the displayed timeline to a maximum of 1-3 years.

How it was found

  1. Create a comment containing a Mermaid Gantt diagram with dates spanning thousands of years.
  2. Reload the page and observe that it takes a very long time to load.

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 (DoS) attack makes a website or service unavailable or very slow for legitimate users. Here, a specially crafted diagram in a comment forces the page to try to draw a timeline spanning thousands of years, which takes a long time to load. This means anyone viewing that comment experiences a very slow page.

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.