markdown-it-prism@2.0.4 vulnerabilities

Highlights code blocks in markdown-it using Prism.

  • latest version

    2.3.1

  • latest non vulnerable version

  • first published

    8 years ago

  • latest version published

    5 days ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the markdown-it-prism package. This does not include vulnerabilities belonging to this package’s dependencies.

    How to fix?

    Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.

    Fix for free
    VulnerabilityVulnerable Version
    • M
    Cross-site Scripting (XSS)

    markdown-it-prism is a The plugin will insert the necessary markup into all code blocks. Include one of Prism’s stylesheets in your HTML to get highlighted code.

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS). It is possible to insert malicious JavaScript as markup to the package which will be returned unsanitised.

    PoC

    public class Foo() {
        public Foo(bar) {
            System.out.println(bar);
        }
    }
    

    How to fix Cross-site Scripting (XSS)?

    Upgrade markdown-it-prism to version 2.1.3 or higher.

    <2.1.3