Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

[security] can inject JS into page via markdown files #45

Closed
lucacasonato opened this issue Oct 24, 2019 · 0 comments · Fixed by #105
Closed

[security] can inject JS into page via markdown files #45

lucacasonato opened this issue Oct 24, 2019 · 0 comments · Fixed by #105

Comments

@lucacasonato
Copy link
Member

Currently it is possible to inject javascript into pages that render markdown using, for example, a <img> element. This element has an onload parameter that will execute any JS that is passed to it once is succeeds/fails in loading the image.

Instead of blacklisting tags like we do now - currently only <script> is blacklisted - we should whitelist 'known good' tags like comments and <div>. The whitelist Github uses is more complex and is 'documented' here. It also takes the actual params of the tags into account.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant