# CVE-2022-23647: node-prismjs: Prism is a syntax highlighting library

CVE-2022-23647 is fixed in node-prismjs on 1 platform, first by DEBIAN-CVE-2022-23647, released February 18, 2022. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2022-23647
- Priority: Routine
- CVSS: 6.1 (medium)
- EPSS: 0.0143
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Feb 18, 2022

## 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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | node-prismjs Debian 12.15 (bookworm) | 1.27.0+dfsg+~1.26.0-1 | [DEBIAN-CVE-2022-23647](https://patchblox.com/security/data/fix/linux/debian-cve-2022-23647.md) | Feb 18, 2022 |
| Linux | node-prismjs Debian 13.5 (trixie) | 1.27.0+dfsg+~1.26.0-1 | [DEBIAN-CVE-2022-23647](https://patchblox.com/security/data/fix/linux/debian-cve-2022-23647.md) | Feb 18, 2022 |
| Linux | node-prismjs Debian 14 | 1.27.0+dfsg+~1.26.0-1 | [DEBIAN-CVE-2022-23647](https://patchblox.com/security/data/fix/linux/debian-cve-2022-23647.md) | Feb 18, 2022 |

---

Data as of 2026-11-08T13:06:02Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
