npm package report

Is prismjs safe?

6 known vulnerabilities, worst severity HIGH.

// reach

1 direct dependencies

none carry a known advisory

    62 packages depend on it

    an advisory here reaches each of them

    Create a free accountfor every dependency path, dependent and what to upgrade
    // ai model usage

    Tracked for PyPI packages. HuggingFace models declare Python dependencies, so npm packages are not covered.


    cvss
    7.5
    high

    CVSS v3.1 base score out of 10

    epss
    1.4%
    medium

    chance of exploitation in 30 days, 73rd percentile of all CVEs

    xyz score
    4.6
    medium

    CyberXYZ composite out of 10

    fig. 01 — GHSA-3949-f494-cm99, the advisory selected below

    // 6 advisories

    GHSA-3949-f494-cm99

    HIGHGitHub ratingCVE-2022-23647
    // impact

    Prism's Command line plugin can be used by attackers to achieve an XSS attack. The Command line plugin did not properly escape its output, leading to the input text being inserted into the DOM as HTML code.

    Server-side usage of Prism is not impacted. Websites that do not use the Command Line plugin are also not impacted.

    // patches

    This bug has been fixed in v1.27.0.

    // workarounds

    Do not use the Command line plugin on untrusted inputs, or sanitized all code blocks (remove all HTML code text) from all code blocks that use the Command line plugin.

    // references
    // cvss v3.1 vector

    CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:L

    Attack vector
    Network
    Attack complexity
    High
    Privileges required
    None
    User interaction
    Required
    Scope
    Changed
    Confidentiality
    High
    Integrity
    Low
    Availability
    Low

    Checked 2026-11-07 at 00:02 UTC. The most recent advisory here was published 2025-03-03. Updated continuously from NVD, GHSA, OSV and CNA feeds.

    Think a verdict here is wrong? Tell us — we respond within 2 business days.