cve.bz

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

6.1 mediumEPSS 1.4%Fix available

Medium (6.1) in prismjs prism. EPSS 1.4% estimated probability of exploitation activity in the next 30 days. Fixed in prismjs 1.27.0.

On this page
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.

Severity

CVSS 3.1

6.1 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS
1.4% (unchanged from 1.4% a week ago; 1.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 74th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2025-04-23. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-79 Improper Neutralization of Input During Web Page Generation (Cross-site Scripting)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-23647 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-23647?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-23647?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-23647 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
prismjs:prismfrom 1.14.0 before 1.27.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-3949-f494-cm99npmprismjs>=1.14.0 <1.27.01.27.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14node-prismjs1.27.0+dfsg+~1.26.0-1DEBIAN-CVE-2022-23647
Ubuntu20.04:LTS, 22.04:LTSnode-prismjsno fix listedUBUNTU-CVE-2022-23647

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Important.

Red Hat's statement

This issue affects Prism as shipped with all versions of Red Hat Ceph Storage, Red Hat Migration Toolkit for Virtualization, Red Hat OpenShift Container Platform, Red Hat OpenShift Service Mesh, Red Hat Advanced Cluster Security, and Red Hat Gluster Storage. However, this flaw is not known to be exploitable under any supported scenario, as websites that do not use the Command Line plugin are also not impacted. The above products do not use the Command Line plugin, thus, are marked not affected.

ProductPackageStateAdvisory
Red Hat Data Grid 8.4.0prismjsFixed 2022-11-17RHSA-2022:8524
RHINT Service Registry 2.3.0 GAprismjsFixed 2022-10-06RHSA-2022:6835
Migration Toolkit for Virtualizationmigration-toolkit-virtualization/mtv-ui-rhel8Not affected
OpenShift Developer Tools and ServicesodoFix deferred
OpenShift Service Mesh 2.0servicemesh-grafanaNot affected
OpenShift Service Mesh 2.1openshift-service-mesh/kiali-rhel8Not affected
OpenShift Service Mesh 2.1servicemesh-grafanaNot affected
Red Hat 3scale API Management Platform 23scale-apicast-operator-bundle-containerAffected
Red Hat 3scale API Management Platform 23scale-apicast-operator-containerAffected
Red Hat Advanced Cluster Security 3advanced-cluster-security/rhacs-docs-rhel8Not affected
Red Hat Advanced Cluster Security 3advanced-cluster-security/rhacs-main-rhel8Not affected
Red Hat Advanced Cluster Security 3advanced-cluster-security/rhacs-rhel8-operatorNot affected
Red Hat Advanced Cluster Security 3advanced-cluster-security/rhacs-roxctl-rhel8Not affected
Red Hat A-MQ OnlineprismjsNot affected
Red Hat Ansible Automation Platform 2aap-azure-uiNot affected
Red Hat Ceph Storage 3grafanaNot affected
Red Hat Ceph Storage 4rhceph/rhceph-4-dashboard-rhel8Not affected
Red Hat Ceph Storage 5rhceph/rhceph-5-dashboard-rhel8Not affected
Red Hat Enterprise Linux 8grafanaNot affected
Red Hat Enterprise Linux 9grafanaNot affected
8 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-23647.

Attack patterns (CAPEC)

  • CAPEC-63 Cross-Site Scripting (XSS) Likelihood: High · Severity: Very High
  • CAPEC-85 AJAX Footprinting Likelihood: High · Severity: Low
  • CAPEC-209 XSS Using MIME Type Mismatch Severity: Medium
  • CAPEC-588 DOM-Based XSS Likelihood: High · Severity: Very High
  • CAPEC-591 Reflected XSS Likelihood: High · Severity: Very High
  • CAPEC-592 Stored XSS Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON