CVE-2020-7773
MEDIUM 6.1CVSS 3.1Cross-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);
- Published
- 16 Nov 2020
- Last modified
- 8 Jul 2026
- Assigned by
- report@snyk.io
- NVD status
- Modified
- Weakness
- CWE-79
- Also known as
- GHSA-f246-xrrj-g8j6SNYK-JS-MARKDOWNITHIGHLIGHTJS-1040461
- Sources
- NVDJSONOSV GHSA-f246-xrrj-g8j6JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | report@snyk.io (Secondary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 4.3 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | markdown-it-highlightjs_project | markdown-it-highlightjscpe:2.3:a:markdown-it-highlightjs_project:markdown-it-highlightjs:*:*:*:*:*:node.js:*:* |
< 3.3.1 | 3.3.1 |
| OSV | npm | markdown-it-highlightjs | < 3.3.1 | 3.3.1 |
References
- https://github.com/valeriangalliat/markdown-it-highlightjs/blob/v3.3.0/index.js%23L52 · Broken Link, WEB
- https://github.com/valeriangalliat/markdown-it-highlightjs/pull/14 · Exploit, Third Party Advisory, WEB
- https://snyk.io/vuln/SNYK-JS-MARKDOWNITHIGHLIGHTJS-1040461 · Mitigation, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2020-7773 · ADVISORY
History
- 25 Nov 2026 20:32 UTC · NVD: first stored (published 16 Nov 2020)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 10 Feb 2022)