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
-
As an authenticated GitLab.com user on a Gold plan, create a new group
-
Within the group, create a new Epic ("parent") with the title
test'>{{4-1}}</select></script><img src=x onerror=alert(document.domain)><img src=x onerror=alert(document.domain)> -
Create another Epic ("child") with any title and take note of the URL.
-
Return to the parent Epic > click the plus button inside the "Epics" pane > add the child epic URL
-
Finally, browse to the child Epic and observe that
alert(document.domain)is executed.

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'>{{4-1}}<img src=x onerror=alert(document.domain)>{{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!
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
- As an authenticated GitLab.com user on a Gold plan, create a new group.
- Within the group, create a new Epic ("parent") with a malicious title.
- Create another Epic ("child") with any title and note its URL.
- Return to the parent Epic, click the plus button in the "Epics" pane, and add the child epic URL.
- 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.