CVEvulnerability
CVE-2020-7773
6.1 MEDIUM
Official page ↗
- Status
- Modified
- Published
- 2020-11-16
- Last modified
- 2026-06-17
- Assigner
- [email protected]
- CVSS 3.1 ([email protected])
- 6.5 MEDIUM — CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
- CVSS 3.1 ([email protected])
- 6.1 MEDIUM — CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- CVSS 2.0 ([email protected])
- 4.3 MEDIUM — AV:N/AC:M/Au:N/C:N/I:P/A:N
- Weaknesses
- CWE-79
Description
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 configurations
• markdown-it-highlightjs project markdown-it-highlightjs (< 3.3.1)
Related
Weakness · CWE (1)
- CWE-79 Improper Neutralization of Input During Web Page Generation weakness
References
- 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