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
- github.com/PrismJS/prism@e002e78 commit
- github.com/PrismJS/prism#3341 pull request
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 odoaffected: no fix available “Fix deferred”
-
Red Hat 3scale API Management Platform 2 3scale-amp2/apicast-rhel7-operator, 3scale-amp2/apicast-rhel7-operator-metadataaffected: no fix available
-
Red Hat Integration Service Registry prismjsaffected: no fix planned “Out of support scope”
-
Red Hat OpenShift GitOps openshift-gitops-1/argocd-rhel8affected: no fix planned “Will not fix”
-
Red Hat Data Grid 8.4.0fixed: vendor fix RHSA-2022:8524
-
Red Hat RHINT Service Registry 2.3.0 GAfixed: 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-uinot affected: vulnerable code not present
+11 more productsfewer
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
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
-
github.com
/PrismJS/prism/pull/3341
web, patch, third-party-advisory
-
github.com
/PrismJS/prism/commit/e002e78c343154e1c0ddf9d6a0bb85689e1a5c7c
web, patch, third-party-advisory
-
github.com
/PrismJS/prism/security/advisories/GHSA-3949-f494-cm99
web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-23647
advisory
-
github.com
/PrismJS/prism
package
Sources
- CVE List CVE-2022-23647
- GitHub Advisory GHSA-3949-f494-cm99
- NVD CVE-2022-23647
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.