All CVEs / Markdown-it-highlightjs Project
CVE-2020-7773Markdown-it-highlightjs Project Markdown-it-highlightjs
Medium 6.1 No auth needed
Follow: this CVE · Markdown-it-highlightjs Project · Markdown-it-highlightjs Project Markdown-it-highlightjs We alert you by email or Slack (account required).
- Priority
- 52
- CVSS 3.1
- 6.1
- EPSS
- 1.4% probability of exploitation in 30 days · percentile 72
- Auth required
- No
- Published
- Nov 16, 2020
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-79
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
What happens
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);
What to do
- Apply the vendor's security update for Markdown-it-highlightjs.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | markdown-it-highlightjs |
< 3.3.1 |
3.3.1 |
npm install markdown-it-highlightjs@3.3.1 |
Per OSV / GitHub Advisories (GHSA-f246-xrrj-g8j6). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| markdown-it-highlightjs_project | markdown-it-highlightjs | < 3.3.1 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Broken Link
- github.com Exploit Third Party Advisory
- snyk.io Mitigation Third Party Advisory