This affects the package markdown-it-highlightjs before 3.3.1. It is possible insert malicious JavaScript as a value of lang in the markdown-it-highlightjs Inline code highlighting feature. const markdownItHighlightjs = require("markdown-it-highlightjs"); const md = require('markdown-it'); const reuslt_xss = md() .use(markdownItHighlightjs, { inline: true }) .render('console.log(42){.">js}'); console.log(reuslt_xss);
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Link | Tags |
---|---|
https://snyk.io/vuln/SNYK-JS-MARKDOWNITHIGHLIGHTJS-1040461 | third party advisory mitigation |
https://github.com/valeriangalliat/markdown-it-highlightjs/pull/14 | third party advisory exploit |
https://github.com/valeriangalliat/markdown-it-highlightjs/blob/v3.3.0/index.js%23L52 | broken link |