{"cve":"CVE-2022-23647","nvd":{"published":"2022-02-18T15:15:07.740","modified":"2026-06-17T04:30:33.493","status":"Modified","description":"Prism is a syntax highlighting library. Starting with version 1.14.0 and prior to version 1.27.0, Prism's command line plugin can be used by attackers to achieve a cross-site scripting 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. This bug has been fixed in v1.27.0. As a workaround, do not use the command line plugin on untrusted inputs, or sanitize all code blocks (remove all HTML code text) from all code blocks that use the command line plugin.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1},"cwes":["CWE-79"],"references":["https://github.com/PrismJS/prism/commit/e002e78c343154e1c0ddf9d6a0bb85689e1a5c7c","https://github.com/PrismJS/prism/pull/3341","https://github.com/PrismJS/prism/security/advisories/GHSA-3949-f494-cm99","https://github.com/PrismJS/prism/commit/e002e78c343154e1c0ddf9d6a0bb85689e1a5c7c","https://github.com/PrismJS/prism/pull/3341"],"products":["prismjs:prism"],"source":"nvd","synced_at":"2026-10-19T21:28:04.509275555+00:00"},"epss":{"cve":"CVE-2022-23647","score":0.01425,"percentile":0.72921,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-3949-f494-cm99","url":"https://osv.dev/vulnerability/GHSA-3949-f494-cm99","summary":"Cross-site Scripting in Prism","modified":"2023-11-08T04:08:26.360065Z","packages":[{"ecosystem":"npm","name":"prismjs","purl":"pkg:npm/prismjs","ranges":[">=1.14.0 <1.27.0"],"fixed":["1.27.0"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}