Cross-site scripting (XSS) in markdown-it-highlightjs
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.
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);
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | markdown-it-highlightjs | before 3.3.1 | 3.3.1 | Patch available | CNA |
| — | markdown-it-highlightjs (npm) | before 3.3.1 | 3.3.1 | Patch available | GHSA-f246-xrrj-g8j6 |
- markdown-it-highlightjs Vendor— Affected before 3.3.1 Fixed in 3.3.1 Patch available CNA
- markdown-it-highlightjs (npm) Vendor— Affected before 3.3.1 Fixed in 3.3.1 Patch available GHSA-f246-xrrj-g8j6
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:markdown-it-highlightjs_project:markdown-it-highlightjs:*:*:*:*:*:node.js:*:* | before 3.3.1 | Vulnerable | Markdown-it-highlightjs Project |
- cpe:2.3:a:markdown-it-highlightjs_project:markdown-it-highlightjs:*:*:*:*:*:node.js:*:* Versions before 3.3.1 Vulnerable ·Markdown-it-highlightjs Project
Remediation
- Fix · CNA markdown-it-highlightjs Fixed in 3.3.1
- Fix · GHSA-f246-xrrj-g8j6 markdown-it-highlightjs (npm) Fixed in 3.3.1 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2020-7773
- 2026-10-03 Alias added: GHSA-f246-xrrj-g8j6
References
Sources
- CVE-2020-7773 · CVE Program
- CVE-2020-7773 · NVD
- FIRST EPSS
- GHSA-f246-xrrj-g8j6 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences