org.webjars.npm:prismjs@1.17.1 vulnerabilities

  • latest version

    1.29.0

  • latest non vulnerable version

  • first published

    7 years ago

  • latest version published

    2 years ago

  • licenses detected

  • package manager

  • Direct Vulnerabilities

    Known vulnerabilities in the org.webjars.npm:prismjs 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)

    org.webjars.npm:prismjs is a lightweight, robust, elegant syntax highlighting library.

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS) via the command line plugin which does not properly escape its output, leading to the input text being inserted into the DOM as HTML code.

    How to fix Cross-site Scripting (XSS)?

    Upgrade org.webjars.npm:prismjs to version 1.27.0 or higher.

    [1.14.0,1.27.0)
    • H
    Regular Expression Denial of Service (ReDoS)

    org.webjars.npm:prismjs is a lightweight, robust, elegant syntax highlighting library.

    Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via the Prism.languages.markup.comment regex.

    PoC

    var comment = /<!--[\s\S]*?-->/
    for(var i = 1; i <= 50000; i++) {
      var time = Date.now();
      var attack_str = ""+"<!--".repeat(i*10000)+"-"
      comment.test(attack_str)
      var time_taken = Date.now() - time;
      console.log("attack_str.length: " + attack_str.length + ": " + time_taken+" ms")
    }
    

    How to fix Regular Expression Denial of Service (ReDoS)?

    Upgrade org.webjars.npm:prismjs to version 1.25.0 or higher.

    [,1.25.0)
    • H
    Regular Expression Denial of Service (ReDoS)

    org.webjars.npm:prismjs is a lightweight, robust, elegant syntax highlighting library.

    Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via the prism-asciidoc and prism-erb components. When Prism is used to highlight untrusted (user-given) text, an attacker can craft a string that will take a very very long time to highlight.

    How to fix Regular Expression Denial of Service (ReDoS)?

    Upgrade org.webjars.npm:prismjs to version 1.24.1 or higher.

    [,1.24.1)
    • H
    Regular Expression Denial of Service (ReDoS)

    org.webjars.npm:prismjs is a lightweight, robust, elegant syntax highlighting library.

    Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via the prism-asciidoc, prism-rest, prism-tap and prism-eiffel components.

    How to fix Regular Expression Denial of Service (ReDoS)?

    Upgrade org.webjars.npm:prismjs to version 1.23.0 or higher.

    [,1.23.0)
    • H
    Cross-site Scripting (XSS)

    org.webjars.npm:prismjs is a lightweight, robust, elegant syntax highlighting library.

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS) via the easing preview of the Previewers plugin. It allows attackers to execute arbitrary code in Safari and Internet Explorer.

    How to fix Cross-site Scripting (XSS)?

    Upgrade org.webjars.npm:prismjs to version 1.21.0 or higher.

    [1.1.0,1.21.0)