Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

XSS possible by firstly disabling Javascript and entering some script  #242

@duncan-at-hiveit

Description

@duncan-at-hiveit

Hi there,

First off, thanks for the excellent WYSIWYG! It's been a real help to us.

Unfortunately we've run across a case in version 1.1.1 where it is possible to inject Javascript into the page.

Steps to reproduce:

  1. Visit a page with a WYSIWYG editor
  2. Disable Javascript
  3. Refresh the page
  4. Add some script e.g. <script>alert("Hallo!")</script> to the now-plain textarea.
  5. Save
  6. Enable Javascript and refresh the page
  7. A Javascript alert will pop up saying "Hallo!"

It seems to be able to do this by the fact that Hallo assumes that its content has been entered by itself. When it converts HTML to markdown it additionally adds a backslash to any ">" symbols it finds, thus rendering any HTML and Javascript entered in the WYSIWYG "disabled". So <script>alert("Hallo!")</script> would actually be cleansed to <script>alert("Hallo!")</script>

The problem therefore can occur when displaying text that hasn't been through Hallo's own save mechanism.

Many thanks,
Duncan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions