DOMPurify should always be run as the very last step before inserting anything into the DOM. Currently nutshell doesn't do this so there's a few ways to obtain XSS. This should fix potential issues (but also, ideally the code should be rewritten to avoid all the HTML concatention and instead use dom node/tree operations)
If nutshell processes on untrusted (but sanitized) content, there are some XSS vulnerabilities:
e.g.
gets transformed to
there's also xss with untrusted youtube urls, e.g. the URL
https://youtu.be/pQ2dI_B_Ycg?t=36"></iframe><img src=x onerror="alert(1)">
DOMPurify should always be run as the very last step before inserting anything into the DOM. Currently nutshell doesn't do this so there's a few ways to obtain XSS. This should fix potential issues (but also, ideally the code should be rewritten to avoid all the HTML concatention and instead use dom node/tree operations)