Skip to content
XSS Disclosed report Beginner

Denial of Service on Snippets Page via User Comments

A user could set their full name to an HTML payload that was not escaped when displayed on the snippets page, causing the page to be covered by a modal overlay. An attacker could make many public snippets pages inaccessible to visitors.

GitLab

Originally disclosed on GitLab

  • Fixed in 2 hours
  • Disclosed after 2 hours

HackerOne report #900346 by rafiem on 2020-06-17, 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!

Summary

On snippets page, user able to craft some HTML payload to their full name settings to cause an Denial of Service on the snippets page that commented by that user. When another user visit the snippets page that commented by the attacker, the snippets page become totally inaccessbile from such action and view.

Steps to reproduce

  1. User A create a personal public snippets or create a project public snippets
  2. User B go to https://gitlab.com/profile and change the Full Name to this payload (Since the max length of full name is limited (127 char), the possible payload is limited), Here is my payload :
HTML
<a href="https://gitlabs.com"><div class="modal show d-block bg-light"><div class="modal-body"><h1>Denial of Service PoC  
  1. User B then comment on both snippets created by User A and the Denial of Service happened on the page because it the page totally covered by the HTML payload from User B fullname.

Impact

  • Make the targeted snippets page to be fully covered by payload, thus making the user visited the page cannot interact to the gitlab system anymore on that page either do an action or view
  • Since this issue happened on snippets page, attacker may perform this action on many public snippets exist on gitlab.com

Examples

[REDACTED]-> (Personal public snippets by User A)
[REDACTED]-> (Project public snippets by User A)

What is the current bug behavior?

Denial of Service on snippets comment via user full name

What is the expected correct behavior?

The user full name should be properly escaped on the snippets comment feature (like on issue comment, mr comment, and etc), since it is not necessary to load any html tag to that context

Relevant logs and/or screenshots

Trigerred on personal snippets
[REDACTED]

Trigerred on project snippets
[REDACTED]

Output of checks

This bug happens on GitLab.com

Impact

  • Make the targeted snippets page to be fully covered by payload, thus making the user visited the page cannot interact to the gitlab system anymore on that page either do an action or view
  • Since this issue happened on snippets page, attacker may perform this action on many public snippets exist on gitlab.com

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

[REDACTED] [REDACTED]

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 full name field was rendered without HTML escaping on the snippets comment section, unlike other comment areas.

Impact

The targeted snippets page is fully covered by the payload, so visitors cannot interact with GitLab on that page; the attacker could do this on many public snippets.

What the attacker needed

A GitLab account; victim visits the snippets page

How it was found

  1. User A creates a personal public snippet or a project public snippet.
  2. User B changes their full name to an HTML payload (limited to 127 characters).
  3. User B comments on both snippets created by User A.
  4. The snippets page becomes covered by the HTML payload from User B's full name.

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.

When a website shows user-supplied text, it must escape special characters so they appear as text, not code. Here, the full name was inserted into the snippets page without escaping, so an attacker could inject HTML that covered the page with a fake modal, blocking normal use. This is a denial of service because it stops people from using that page.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.