markdown-it-highlightjs
Affected
- introduced
0, fixed3.3.1(semver)
Fixed versions
3.3.1
Fix
- Fixed version
3.3.1npm install [email protected]
Advisory
Also known as: CVE-2020-7773, SNYK-JS-MARKDOWNITHIGHLIGHTJS-1040461
Cross-site Scripting in markdown-it-highlightjs
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);Medium Basis: The source's own band: MODERATE
0, fixed 3.3.1 (semver)3.3.1
3.3.1npm install [email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0