7.5

CVE-2022-23647: prismjs prism Cross-site Scripting

CVSS: 7.5v3.1HighModified
AliasesUBUNTU-CVE-2022-23647DEBIAN-CVE-2022-23647GHSA-3949-f494-cm99
Published 18-02-2022Last modified 23-04-2025

Vulnerability summary

CVE-2022-23647 is a high (CVSS 7.5) Cross-site Scripting vulnerability in prismjs prism. EPSS estimates a 1.43% chance of exploitation in the next 30 days, higher than 72.5% of scored vulnerabilities.

Overall risk
30/100
0100
Medium · default modelHow is this calculated?
CVSS score
7.5/10
010
High · v3.1 (CVE.org)
EPSS score
1.43%
0%100%
Low · -0.05 pp in 30 days
KEVNot listedIn no KEV catalog
RansomwareNone recordedNo known use recorded
Public exploits0No public exploits recorded

Timeline

  1. 18-02-2022
    PublishedVulnerability first disclosed.
  2. 23-04-2025
    Last modifiedVulnerability information updated.

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 metrics

6 scores · 5 sources · 2 versions

EPSS trend

Probability

1.43%

Chance of exploitation in the next 30 days

Percentile

73%

Versus all other CVEs

30-day change

-0.05 pp

From 1.48% on 19-09-2026

19-09-202619-10-2026
EPSS score
1.43%

Known exploited

Compare KEV catalogs

Not in any of the 3 tracked catalogs.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Debian1 product
  • node-prismjs< 1.27.0+dfsg+~1.26.0-1
Npm1 product
  • prismjs≥ 1.14.0, < 1.27.0
Prismjs1 product
  • prism≥ 1.14.0, < 1.27.0
Ubuntu1 product
  • node-prismjsAll versions (No fix recorded)

4 vendors · 4 products

References

9 links