HTML injection in Test Case name leads to ATO
Test case titles were rendered as raw HTML in the test case detail page header, allowing an attacker to inject HTML that triggers JavaScript. An attacker could use this to add a new email address to a victim's account, leading to account takeover.
GitLab
Originally disclosed on GitLab
- Fixed in 37 days
- Disclosed after 37 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 #3486862 by joaxcar on 2026-01-04, imported by @katwu:
Report | Attachments | How To Reproduce
Original Report
Summary
The title of test cases use the title as is in a v-safe-html attribute. This allows an attacker to inject payloads that will trigger Javascript actions as shown in other similar reports.
Steps to reproduce
- Create a new Ultimate project
- Go to https://gitlab.com/GROUPNAME/PROJECTNAME/-/quality/test_cases/new
and name a new test case
<REDACTED>
- In the list of test cases click the new testcase. should have an URL like https://gitlab.com/GROUPNAME/PROJECTNAME/-/quality/test_cases/1
- Copy the full URL of the site
- Go to https://joaxcar.com/fun/delay/prep_poc_vuln.php and paste the URL in the box and submit (this will prepare the attack)
- Go to the URL again and now this time click anywhere on the page. A pop-up will open. when it closes after 10 Seconds
- click anywhere again
- Go to your user profile and see that you have a new email on your account (remove the email to be able to reuse the POC)
Impact
ATO by adding a new email to victim accounts.
What is the current bug behavior?
test case titles are used directly in the header of test case detail pages
What is the expected correct behavior?
The title should not render as HTML
Output of checks
This bug happens on GitLab.com
Impact
ATO by adding a new email to victim accounts.
Attachments
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 application used a safe-html directive to render the test case title without proper sanitisation, allowing HTML injection.
Impact
An attacker could add a new email address to a victim's account, leading to account takeover.
What the attacker needed
Ultimate project; victim visits crafted URL and clicks
How it was found
- Create a new Ultimate project
- Create a new test case with a malicious HTML payload as its name
- Open the test case detail page and copy its URL
- Use an external tool to prepare the attack on that URL
- Visit the URL again and click anywhere on the page; a pop-up opens
- Click again, then check the user profile to see a new email added
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 treat it as plain text, not as code. Here, the test case title was inserted into the page as HTML, so a malicious title could run JavaScript in the browser of anyone who viewed it. That script could then change the victim's account settings, like adding a new email address.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.