Skip to content
XSS Disclosed report Beginner

Stored XSS in Iteration descriptions

The iteration description field on GitLab stored user input without properly sanitising it, so an HTML image tag with an error handler ran as script. Anyone who opened the iteration details page would have the script execute in their browser.

GitLab

Originally disclosed on GitLab

  • Fixed in 4 days
  • Disclosed after 4 days

HackerOne report #926182 by ashish_r_padelkar on 2020-07-17, assigned to @jeremymatos:

Summary

Hello,

I found a stored XSS in iteration description field which affect other users too!

Steps to reproduce

  1. Create a iteration at https://gitlab.com/groups/<GroupName>/-/iterations/new with XSS payload ">{{media:0}} in Description.

  2. Whoever visits the page iteration details page https://gitlab.com/groups/<GroupName>/-/iterations/<ID> will see XSS trigger!

What is the current bug behavior?

Stored XSS in Iteration Description field

What is the expected correct behavior?

Inputs should be properly sanitised to remove event handlers.

Output of checks

This bug happens on GitLab.com

Regards,
Ashish

Impact

Stored XSS affecting other users!

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 iteration description was rendered as HTML without sanitising event handler attributes.

What the attacker needed

A GitLab account able to create iterations; victim opens the iteration page

How it was found

  1. Create a new iteration in a group with a crafted description containing an image tag with an error handler.
  2. Open the iteration details page as any user to see the script run.

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.

A stored cross-site scripting (XSS) bug means text a user saves is later shown to other people as part of the page, and the browser treats part of that text as code. Here, a description containing an image tag with an error handler caused a pop-up to run for every visitor of the iteration page. The fix is to clean the input so such handlers are removed.

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.