-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
XSS Vulnerability in Markdown Editor #1233
Comments
It is important to keep in mind that if I add the following graph to a html page. Then the google analytics script will run as a part of the regular page load, before mermaid starts.
To properly test this mermaids handling of the xss issue one need to use the mermaid API so that mermaid does not pick up the text from the page but some other source like an input field. If I take example above and paste in mermaids online editor it wont run as there would be a syntax error. If I fix that and put quotes around the script tag, then it renders as a script tag but it wont run, (second link). So I would need help to get way to reproduce this in order to verify my security fix where I disable tags in node text. |
Close this in favor of #1242 |
Fix insertOnStartOfLines behaviour
Hi,
I found a XSS issue in the editor. The XSS lies in the Mermaid feature.
The following is the PoC, you can also check it here.
The editor renders the script tag in the html and I can bypass the CSP using google-analytics as shows in this link.
The text was updated successfully, but these errors were encountered: