Vulnerability · Published Nov 16, 2020 · Assigned by snyk

CVE-2020-7773Cross-site Scripting (XSS)

Medium 6.5

In plain English

A medium-severity security flaw in markdown-it-highlightjs. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.4% (higher than 72% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.5Medium
Exploit odds (30 days)1.4%top 28.1% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
npmmarkdown-it-highlightjs3.3.1GHSA-f246-xrrj-g8j6

Affected products (as reported)

VendorProductVersions
n/a markdown-it-highlightjs unspecified – before 3.3.1

References