Stored XSS in merge request pages
- Triaged in 35 hours
- Fixed in 2 months
- Disclosed after 3 months
Summary: I found a Stored XSS in merge request pages.
Description:
The exploit is via the parameter merge_request[source_branch] of the request to create a New Merge Request.
Steps To Reproduce:
- Sign ikn to GitLab.
- Click the "[+]" icon.
- Click "New Project".
- Fill out "Project name" form with "test-project".
- Check the radio button of "Public".
- Check the "Initialize repository with a README".
- Click "Create project" button.
- Go to "http(s)://{GitLab host}/{user id}/test-project/branches/new".
- Fill out each form as follows:
- Branch name: test-branch
- Create from: master
- Click "Create branch" button.
- Go to "http://{GitLab host}/{user id}/test-project/merge_requests".
- Click "Create merge request" button.
- Click "Submit merge request" button.
- Intercept the request.
- Change the
merge_request[source_branch]parameter's value to<img/src=x onerror=alert(1)> - Send the request.
Result: poc.png
Note: This behavior can be reproduced on all modern browsers.
Impact
The security impact is the same as any typical Stored XSS.
Thank you.
Attachments

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is known
A high-severity XSS bug in GitLab. HackerOne made it public on 3 December 2018.
About XSS
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.