npm package reportIs 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
// ai model usage Tracked for PyPI packages. HuggingFace models declare Python dependencies, so npm packages are not covered.
cvss CVSS v3.1 base score out of 10
epss chance of exploitation in 30 days, 73rd percentile of all CVEs
xyz score CyberXYZ composite out of 10
fig. 01 — GHSA-3949-f494-cm99, the advisory selected below
// 6 advisories GHSA-3949-f494-cm99 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. HIGH GHSA-gj77-59wh-66hg Some languages before 1.24.0 are vulnerable to Regular Expression Denial of Service (ReDoS). HIGH GHSA-h4hr-7fg3-h35w The package prismjs before 1.23.0 are vulnerable to Regular Expression Denial of Service (ReDoS) via the prism-asciidoc, prism-rest, prism-tap and prism-eiffel components. HIGH GHSA-wvhm-4hhf-97x9 The easing preview of the Previewers plugin has an XSS vulnerability that allows attackers to execute arbitrary code in Safari and Internet Explorer. HIGH GHSA-x7hr-w5r2-h6wg Prism (aka PrismJS) through 1.29.0 allows DOM Clobbering (with resultant XSS for untrusted input that contains HTML but does not directly contain JavaScript), because document.currentScript lookup can be shadowed by attacker-injected HTML elements. MODE GHSA-hqhp-5p83-hx96 Prism is a syntax highlighting library. The prismjs package is vulnerable to ReDoS (regular expression denial of service). An attacker that is able to provide a crafted HTML comment as input may cause an application to consume an excessive amount of CPU. MODE // 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. Report an issue with this page