Skip to main content
← All vulnerabilities
CVE-2020-7773GHSA-F246-XRRJ-G8J6SNYK-JS-MARKDOWNITHIGHLIGHTJS-1040461

Cross-site Scripting (XSS)

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 3.3.1
None on Exploit-DB, Metasploit or GitHub

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

Timeline

  1. CVE published
  2. Record last updated

Affected versions

  • n/a markdown-it-highlightjs

    fixed in 3.3.1

  • markdown-it-highlightjsnpm

    fixed in 3.3.1

References 3

snyk.io

GitHub · valeriangalliat/markdown-it-highlightjs