All reports
Medium

Cross-site Scripting in markdown-it-highlightjs

Affected versions

Affected versions
< 3.3.1
Fixed version
3.3.1

Exploitation

CVE-2020-7773

Probability of exploitation in the next 30 days: 1.36%

FIRST EPSS · 2026-11-24

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

Links