GHSA-f246-xrrj-g8j6

    Dashboard / Vulnerabilities / GHSA-f246-xrrj-g8j6

    GHSA-f246-xrrj-g8j6

    Published: 10 Feb 2022Last Modified: 8 Jul 2026

    Summary: Cross-site Scripting in markdown-it-highlightjs

    Details: 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. ```js 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

    Package

    Name: markdown-it-highlightjs

    Purl: pkg:npm/markdown-it-highlightjs

    Affected ranges

    Type: SEMVER

    Events:

    Introduced- 0
    Fixed -3.3.1

    Affected versions

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High
    GHSA-f246-xrrj-g8j6 | CVE-DB