Live threats

All CVEs / Markdown-it-highlightjs Project

CVE-2020-7773Markdown-it-highlightjs Project Markdown-it-highlightjs

Medium 6.1 No auth needed

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);

Original NVD text.

What to do

  1. Apply the vendor's security update for Markdown-it-highlightjs.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow 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)

VendorProductVersions
markdown-it-highlightjs_projectmarkdown-it-highlightjs< 3.3.1

Official sources

References

Links published by the sources. Open them with care.