Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

security hole with data: URLs #227

Open
sophiebits opened this issue Aug 20, 2016 · 1 comment
Open

security hole with data: URLs #227

sophiebits opened this issue Aug 20, 2016 · 1 comment

Comments

@sophiebits
Copy link
Collaborator

If you render the markdown

[xss](data:text/html,<script>alert(document.domain)</script>)

using remarkable in Firefox, clicking it will run a script on the domain of the page displaying the rendered markup (test on http://jonschlinkert.github.io/remarkable/demo/), which can be a security issue.

Do you think we could change the protocol blacklist to instead be a whitelist and only include some of the most common protocols? I realize it's already customizable by overriding validateLink but a more secure default would be nice.

If that's too big of a change, "data:" should at least be filtered out in addition to javascript: and vbscript:.

sophiebits added a commit to sophiebits/remarkable that referenced this issue Aug 20, 2016
See jonschlinkert#227. It would still be better to switch to a whitelist but this is an improvement.
@jonschlinkert
Copy link
Owner

jonschlinkert commented Aug 21, 2016

@spicyj added you as a collab, here and on npm. thank you!

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

No branches or pull requests

2 participants