Skip to content
XSS Disclosed report Beginner

Markdown based stored XSS (IE only)

A markdown link could use a vbscript: URL, which Internet Explorer would execute in the site's context when clicked. An attacker could post such a link in a comment or issue so that an IE user who clicks it runs script on the site's domain.

a0xnirudh Follow

Originally disclosed on HackerOne

  • Fixed in 10 days
  • Disclosed after 14 months

Hello,

My other report #116697 deals with any browser even through its not a direct XSS as it doesn't execute in the context of the site. But here is another type of XSS using vbscript: which affects only IE users but executes on the context of the site (check the screenshot for POC alert(document.domain)).

POC:

[clickme](vbscript:alert(document.domain))

vbscript: is not supported in Microsoft EDGE and updated versions of IE 11 (as per this link but it do works if people are working in the compatibility mode (I have read the gitlab instruction which specifically says users to turm off compatibility mode but if IE detects that the incoming webpages has some contents which is supported only on compatibility mode, it recommends that to the users I guess.).

For example, I comment the above link on one of the project/issues and then when I reloaded the page, IE detects that the incoming webpage contains scripts that might not be compatible and hence it told me to enable compatibility options by clicking a button. Usually if people see a warning like that from a browser, they will tend to enable it.

Mitigation

Other then updated versions of IE 11, it works on IE10, 9, 8, 7. Also fixing this issue is so trivial by just blocking the keyword vbscript and since it executes on the context of the site, I believe this should be fixed.

Attachments

gitlab_vbscript_XSS.png
gitlab_vbscript_XSS.png From the original on HackerOne

The original report as published on HackerOne, by a0xnirudh. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 markdown renderer allowed vbscript: URLs in links without filtering the URL scheme.

Impact

Script could run in the site's context for IE users who enable compatibility mode and click the link; modern Edge and updated IE 11 do not support the scheme, so the attack is limited to older or compatibility-mode browsers.

What the attacker needed

Victim uses IE in compatibility mode; victim clicks the crafted link; attacker can post a comment or issue

How it was found

  1. Post a markdown link whose target uses the vbscript scheme in a comment or issue.
  2. Reload the page in Internet Explorer.
  3. IE offers to enable compatibility mode; accept it.
  4. Click the link and the script runs in the site's context.

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.

Markdown lets people write links. The site did not block script-style addresses, so someone could put one in a link. Old Internet Explorer would run it as if the site had written it.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by a0xnirudh

View all

5 more disclosed reports, best first.

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.