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);
References
Link | Resource |
---|---|
https://github.com/valeriangalliat/markdown-it-highlightjs/blob/v3.3.0/index.js%23L52 | Broken Link |
https://github.com/valeriangalliat/markdown-it-highlightjs/pull/14 | Exploit Third Party Advisory |
https://snyk.io/vuln/SNYK-JS-MARKDOWNITHIGHLIGHTJS-1040461 | Mitigation Third Party Advisory |
https://github.com/valeriangalliat/markdown-it-highlightjs/blob/v3.3.0/index.js%23L52 | Broken Link |
https://github.com/valeriangalliat/markdown-it-highlightjs/pull/14 | Exploit Third Party Advisory |
https://snyk.io/vuln/SNYK-JS-MARKDOWNITHIGHLIGHTJS-1040461 | Mitigation Third Party Advisory |
Configurations
Configuration 1 (hide)
|
History
21 Nov 2024, 05:37
Type | Values Removed | Values Added |
---|---|---|
References | () https://github.com/valeriangalliat/markdown-it-highlightjs/blob/v3.3.0/index.js%23L52 - Broken Link | |
References | () https://github.com/valeriangalliat/markdown-it-highlightjs/pull/14 - Exploit, Third Party Advisory | |
References | () https://snyk.io/vuln/SNYK-JS-MARKDOWNITHIGHLIGHTJS-1040461 - Mitigation, Third Party Advisory | |
CVSS |
v2 : v3 : |
v2 : 4.3
v3 : 6.5 |
Information
Published : 2020-11-16 12:15
Updated : 2024-11-21 05:37
NVD link : CVE-2020-7773
Mitre link : CVE-2020-7773
CVE.ORG link : CVE-2020-7773
JSON object : View
Products Affected
markdown-it-highlightjs_project
- markdown-it-highlightjs
CWE
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')