Skip to content
XSS Disclosed report Beginner

Stored XSS using find file

A stored cross-site scripting vulnerability existed in a project's directory name field. An attacker could inject a malicious payload that executed when another user used the 'find file' feature.

GitLab

Originally disclosed on GitLab

  • Fixed in 4 months
  • Disclosed after 4 months

HackerOne report #650670 by xssa on 2019-07-19, assigned to akelly:

Hi security team

Today i found stored xss

POC
-Create Project
-Go and Create New Directory put this Payload in the name of the Directory <noscript><p title="</noscript><img src=x onerror=alert(1)>"> and press creat directory
-Go back now to the project and press find file and put the same payload XSS will execute.

Thanks

Impact

This stored XSS will affect any user visit tor project

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

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.

How it worked

Root cause

Likely the application did not properly sanitise or encode user-supplied directory names before displaying them in the 'find file' results.

Impact

This stored XSS could affect any user who visits the project.

What the attacker needed

Ability to create a project and directory; victim uses the 'find file' feature

How it was found

  1. Create a project.
  2. Create a new directory with a malicious payload in its name.
  3. Go back to the project and use the 'find file' feature with the same payload.
  4. The XSS 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.

Stored XSS happens when a site saves harmful code and later shows it to other users without cleaning it. Here a directory name could contain such code, and when someone used find file, it ran in their browser.

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.