Skip to content
Fencer Vulns
high 7.5

CVE-2022-23647 json

Cross-site Scripting in Prism

published 2022-02-18 4 y ago modified 2026-06-17 4 mo ago also GHSA-3949-f494-cm99 , EUVD-2022-0785

cvss
7.5
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
1.4%
EPSS 1.4% chance of exploitation in 30 days, percentile 73%
public exploits
0
none known

Summary

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.

Patch / fix

  • npm prismjs 1.27.0
  • prismjs prism 1.27.0
  • node-prismjs Debian 14, Debian 13, Debian 12 1.27.0+dfsg+~1.26.0-1

debian advisories DEBIAN-CVE-2022-23647

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2022-23647 updated cvss 6.1

prismjs: improperly escaped output allows a XSS

  • Red Hat OpenShift Developer Tools and Services odo
    affected: no fix available “Fix deferred”
  • Red Hat 3scale API Management Platform 2 3scale-amp2/apicast-rhel7-operator, 3scale-amp2/apicast-rhel7-operator-metadata
    affected: no fix available
  • Red Hat Integration Service Registry prismjs
    affected: no fix planned “Out of support scope”
  • Red Hat OpenShift GitOps openshift-gitops-1/argocd-rhel8
    affected: no fix planned “Will not fix”
  • Red Hat Data Grid 8.4.0
    fixed: vendor fix RHSA-2022:8524
  • Red Hat RHINT Service Registry 2.3.0 GA
    fixed: vendor fix RHSA-2022:6835
  • Red Hat Migration Toolkit for Virtualization migration-toolkit-virtualization/mtv-ui-rhel8 Red Hat OpenShift Service Mesh 2.0 servicemesh-grafana, servicemesh-grafana-prometheus Red Hat OpenShift Service Mesh 2.1 servicemesh-grafana, openshift-service-mesh/kiali-rhel8 Red Hat A-MQ Online prismjs Red Hat Advanced Cluster Security 3 advanced-cluster-security/rhacs-docs-rhel8, advanced-cluster-security/rhacs-main-rhel8, advanced-cluster-security/rhacs-roxctl-rhel8, advanced-cluster-security/rhacs-rhel8-operator Red Hat Ansible Automation Platform 2 aap-azure-ui
    +11 more products
    Red Hat Ceph Storage 3 grafana Red Hat Ceph Storage 4 rhceph/rhceph-4-dashboard-rhel8 Red Hat Ceph Storage 5 rhceph/rhceph-5-dashboard-rhel8 Red Hat Enterprise Linux 8 grafana, grafana-loki, grafana-mssql, grafana-mysql, grafana-selinux, grafana-graphite, +8 more Red Hat Enterprise Linux 9 grafana, grafana-selinux Red Hat Integration Camel K 1 prismjs Red Hat Integration Camel Quarkus 1 prismjs Red Hat Integration Data Virtualisation Operator prismjs Red Hat OpenShift Container Platform 3.11 openshift3/grafana Red Hat OpenShift Container Platform 4 openshift4/ose-grafana Red Hat Storage 3 grafana
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
18 mo ago

Exploit prediction

1.43% chance of exploitation in the next 30 days, higher than 73% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 7.5 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:L
NVD 3.1 6.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NVD 2.0 4.3 AV:N/AC:M/Au:N/C:N/I:P/A:N
GitHub 3.1 7.5 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:L

Affected packages

ecosystem package affected fixed in
npm prismjs
>=1.14.0, <1.27.0
1.27.0

Affected products

  • PrismJS prism

Classification

Weakness
  • CWE-79 Improper Neutralization of Input During Web Page Generation

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.