CVE-2020-7773
6.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N/E:P/RL:O/RC:C
Summary
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);
Affected Software
| Vendor | Product | Version Range | Status |
|---|---|---|---|
| n/a | markdown-it-highlightjs | unspecified < 3.3.1 | affected |
Weaknesses
- Cross-site Scripting (XSS)
ADP Enrichment
CVE Program Container
Additional References
- https://snyk.io/vuln/SNYK-JS-MARKDOWNITHIGHLIGHTJS-1040461
- https://github.com/valeriangalliat/markdown-it-highlightjs/pull/14
- https://github.com/valeriangalliat/markdown-it-highlightjs/blob/v3.3.0/index.js%23L52
References
- https://snyk.io/vuln/SNYK-JS-MARKDOWNITHIGHLIGHTJS-1040461
- https://github.com/valeriangalliat/markdown-it-highlightjs/pull/14
- https://github.com/valeriangalliat/markdown-it-highlightjs/blob/v3.3.0/index.js%23L52
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.