jpuri / jpuri/draftjs-to-html

Markdown to HTML XSS

Open
#47 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
325
Forks
139
PR merge metrics
No merged PRs in 30d

Description

If I do [some text](javascript:alert('xss')) in the editor, this will get rendered when i click on the link.
The format above is in markdown

image

Therefore, this is quite vulnerable to attacks: https://github.com/showdownjs/showdown/wiki/Markdown%27s-XSS-Vulnerability-(and-how-to-mitigate-it)

Is there any way we can solve this?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported [some text](javascript:alert('xss')) link in the editor and inspect the Markdown-to-HTML rendering path. Use the linked XSS reference as background; done means the payload no longer executes when rendered or clicked while normal links and images continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, markdown
Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.