Skip to content
XSS Disclosed report Intermediate

Stored XSS in Child Epics via ancestor Epic name

The Ancestors panel in GitLab Epics did not properly sanitise parent Epic titles, allowing stored XSS when a child Epic was viewed. An attacker could execute arbitrary JavaScript in a victim's session with minimal interaction.

GitLab

Originally disclosed on GitLab

  • Fixed in 35 days
  • Disclosed after 35 days

HackerOne report #549747 by near_ on 2019-04-28, assigned to estrike:

Background

GitLab 11.7 introduced the ability to nest Epics with a maximum depth of 5. The "Ancestors" panel does not sanitize parent Epic titles correctly leading to stored XSS when a child Epic is loaded.

Issue

Proof of concept

  1. As an authenticated GitLab.com user on a Gold plan, create a new group

  2. Within the group, create a new Epic ("parent") with the title test'>{{4-1}}</select></script>&lt;img src=x onerror=alert(document.domain)&gt;<img src=x onerror=alert(document.domain)>

  3. Create another Epic ("child") with any title and take note of the URL.

  4. Return to the parent Epic > click the plus button inside the "Epics" pane > add the child epic URL

  5. Finally, browse to the child Epic and observe that alert(document.domain) is executed.

child_epic_xss.png
child_epic_xss.png From the original on GitLab

 Context

It looks like the unsanitized HTML is being injected into a hidden sidebar <div> within the Ancestors pane:

<div aria-hidden="true" class="d-none" style="display: none;"><div><span>test'&gt;{{4-1}}&lt;img src=x onerror=alert(document.domain)&gt;{{media:1}}</span></div></div>  

I used https://gitlab.com/groups/near_h1_group_a/-/epics/7 as the parent Epic and https://gitlab.com/groups/near_h1_group_a/-/epics/8 as the child Epic (both are located within a private Group).

Impact

An attacker could use this stored XSS on GitLab.com and self-hosted CE/EE instances to execute arbitrary JavaScript (e.g. for info theft / taking malicious actions) in victims' sessions with minimal user interaction.

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

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 application failed to properly escape or sanitise user-supplied Epic titles before rendering them in the Ancestors sidebar.

Impact

An attacker could use this stored XSS on GitLab.com and self-hosted CE/EE instances to execute arbitrary JavaScript (e.g. for info theft / taking malicious actions) in victims' sessions with minimal user interaction.

What the attacker needed

Authenticated GitLab.com user; Gold plan; victim views child Epic

How it was found

  1. As an authenticated GitLab.com user on a Gold plan, create a new group.
  2. Within the group, create a new Epic ("parent") with a malicious title.
  3. Create another Epic ("child") with any title and note its URL.
  4. Return to the parent Epic, click the plus button in the "Epics" pane, and add the child epic URL.
  5. Browse to the child Epic and observe that the JavaScript executes.

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 you view a child Epic, GitLab shows a list of its parent Epics in a sidebar. The titles of those parents were not cleaned properly, so if a parent title contained malicious code, it would run in your browser when you opened the child. This could let an attacker steal your session or perform actions as you.

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.