HTML injection in Workitem name leads to account takeover
Work item names were rendered with v-safe-html, which allowed HTML injection. An attacker could craft a work item name that turns the page into a button leading to account takeover by adding an email to the victim's account.
GitLab
Originally disclosed on GitLab
- Fixed in 58 days
- Disclosed after 58 days
⚠️ 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 #3189522 by joaxcar on 2025-06-11, assigned to GitLab Team:
Report | How To Reproduce
Report
Summary
This is similar to the issue reported here https://hackerone.com/reports/REDACTED that got fixed in https://about.gitlab.com/releases/2025/06/11/patch-release-gitlab-18-0-2-released/
This time its the name of Workitems that re rendered directly using v-safe-html. Which is somewhat safe but that can still be abused for some injection attacks as I proved in #3085738
By naming a Workitem
<a href=/\\joaxcar.com/fun/delay/workitem.html><div class=js-new-user-signups-cap-reached data-dismiss-endpoint='/api/v4/user/[email protected]' data-defer-links=false data-feature-id=1><button class='js-close fixed-top gl-h-full gl-w-full'>
and then visit the workitem page (ex., http://gdk.test:3000/test/test/-/issues/1), the entire screen will become a button that will lead to ATO by adding an email to the victim account.
At the moment Workitems are in Beta and thus not enabled on gitlab.com its possible to test it on a GDK instance
Steps to reproduce
- Enable the three flags
work_item_planning_view,work_item_epicsandnamespace_level_work_itemson your GDK - Go into any project workitem list like this http://gdk.test:3000/test/test/-/work_items
- Create a new workitem named
<a href=/\\joaxcar.com/fun/delay/workitem.html><div class=js-new-user-signups-cap-reached data-dismiss-endpoint='/api/v4/user/[email protected]' data-defer-links=false data-feature-id=1><button class='js-close fixed-top gl-h-full gl-w-full'>
- Visit http://gdk.test:3000/test/test/-/issues/1
- Click anywhere and the attack should start like in my other report
Impact
HTML injection that can be escalated to ATO
What is the current bug behavior?
HTML is not sanitized in workitem names
What is the expected correct behavior?
There should be better sanitation on work items
Impact
HTML injection that can be escalated to ATO
How To Reproduce
Please add reproducibility information to this section:
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 work item name was rendered using v-safe-html, which permits some HTML injection that can be abused for UI redressing and account takeover.
Impact
HTML injection that can be escalated to account takeover by adding an email to the victim's account.
What the attacker needed
GDK instance with feature flags enabled; Victim visits the work item page; Victim clicks anywhere on the page
How it was found
- Enable the three feature flags on a GDK instance.
- Go to a project's work item list.
- Create a new work item with a crafted HTML name.
- Visit the work item page.
- Click anywhere on the page to trigger the attack.
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.
Work item names were displayed as HTML without proper cleaning. An attacker could put HTML code in a work item name so that when someone views it, the page becomes a giant button. Clicking anywhere could then add the attacker's email to the victim's account, letting them take it over.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.