Skip to content
XSS Disclosed report Beginner CVE-2020-8294

Stored XSS in markdown file with Nextcloud Talk using Internet Explorer

A markdown editor allowed users to create links with a javascript: URL, which was not sanitised. An attacker could execute arbitrary JavaScript in the browser of a victim who opened the file and clicked the link, though CSP blocked this in modern browsers and only Internet Explorer was affected.

verg Follow

Originally disclosed on HackerOne

  • Triaged in 16 days
  • Fixed in 3 months
  • Paid in 3 months
  • Disclosed after 4 months

While editing a markdown file through the text app, users can create link elements that have a javascript URL such as javascript:alert(1).

Steps to reproduce:

  • While editing a markdown file, select some text and click the "Add Link" button.

  • Using a web proxy, intercept the request and change the href value to javascript:alert(1).

  • Refresh the document and click the malicious link created to fire the payload.

xss_markdown_2.png
xss_markdown_2.png From the original on HackerOne

Note that CSP blocks the javascript from running, but browsers such as IE are still vulnerable.

xss_markdown_3.png
xss_markdown_3.png From the original on HackerOne

Impact

An attacker could execute arbitrary JavaScript code on the web browser of a victim who opens the file and clicks the malicious link.

Attachments

xss_markdown_1.png
xss_markdown_1.png From the original on HackerOne

The original report as published on HackerOne, by verg. 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

Impact

An attacker could execute arbitrary JavaScript in the victim's browser when they open the file and click the link, but CSP blocked this in modern browsers and only Internet Explorer was vulnerable.

What the attacker needed

Ability to edit a markdown file; victim opens the file and clicks the link; victim uses Internet Explorer

How it was found

  1. While editing a markdown file, select some text and click the 'Add Link' button.
  2. Using a web proxy, intercept the request and change the href value to a javascript URL.
  3. Refresh the document and click the malicious link created to fire the payload.

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.

When you add a link in a markdown document, the app should only allow safe web addresses. Here, someone could trick the editor into saving a link that runs code instead of opening a page. If a victim clicked that link in an old browser, the code would run in their session.

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 Nextcloud

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.