TL;DR always use a templating engine that makes you think about XSS and don't allow unsanitized user-provided HTML through raw.
TL;DR always use a templating engine that makes you think about XSS and don't allow unsanitized user-provided HTML through raw.
It's sad that you even need to say this, both for the fact that Javascript sandboxing is so terrible and the fact that developers aren't aware of the hazards of just blindly taking user-provided HTML.
[1] https://github.com/chjj/marked/commit/904c71b7713979b01d5bc5...
[2] https://github.com/npm/npm-www/commit/a1ed923870609b578fcde4...
edit: On closer inspection it looks like it may have been a problem with the html sanitizer[3] it used as opposed to the marked `sanitize` option (which is not used at all). I guess my conscience is clear here at least.
[3] https://github.com/npm/npm-www/blob/master/models/package.js...
We have no reason to assume they haven't. The 0-day market is extremely lucrative, and they trade exploits rarely known to the wider community.