Skip to content

Sanitize content to avoid XSS #60

Description

@Framartin

Markdown Preview Plus makes Chrome/Chromium vulnerable to XSS attacks on files that are not designed to be interpreted by web applications.

How to reproduce

  1. An malicious user creates a txt file (or another format supported by Markdown Preview Plus) with the following content: <script>alert(0)</script>
  2. He uploads it on a remove server using a web application
  3. If the web application allows the opening of txt files in the browser, Markdown Preview Plus is a vector for XSS attacks, because the JS payload will be executed

This behavior makes all users of Markdown Preview Plus vulnerable to XSS attacks in a lot of web sites, because these websites are not designed to escape or force the download of txt files.

How to fix

Markdown Preview Plus should sanitize the content in order to avoid XSS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions