CVE-2022-23647
mediumpriority · track · 24EPSS 0.014 · 73 %ileDEEUUSEPSS · scored 2026-10-27
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
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · medium–high · 4.3–7.5
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (4)
Products and version ranges known to be affected.
- IBM Maximo Asset Management 7.6.1.2all versionscert_bundDEcpe:/a:ibm:maximo_asset_management:7.6.1.2
advisories (2)
Vendor and ecosystem advisories describing this.
- WID-SEC-W-2023-0554IBM Maximo Asset Management: Schwachstelle ermöglicht Cross-Site ScriptingDeutsch2023-03-02csaf · cert_bundDE
Ein entfernter, anonymer Angreifer kann eine Schwachstelle in IBM Maximo Asset Management ausnutzen, um einen Cross-Site Scripting Angriff durchzuführen.
- GHSA-3949-f494-cm99Cross-site Scripting in Prism2022-02-22ghsa · osvUS
### Impact Prism's [Command line plugin](https://prismjs.com/plugins/command-line/) can be used by attackers to achieve an XSS 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. ### Patches This bug has been fixed in v1.27.0. ### Workarounds Do not use the Command line plugin on untrusted inputs, or sanitized all code blocks (remove all HTML code text) from all code blocks that use the Command line plugin. ### References - https://github.com/PrismJS/prism/pull/3341
also known as (3)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (16)
External citations — patches, advisories, analysis.
- https://access.redhat.com/security/cve/cve-2022-23647cnnvd
- https://cxsecurity.com/cveshow/CVE-2022-23647/cnnvd
- https://github.com/PrismJS/prism/commit/e002e78c343154e1c0ddf9d6a0bb85689e1a5c7ccnnvd
- https://github.com/PrismJS/prism/pull/3341cnnvd
- https://github.com/PrismJS/prism/security/advisories/GHSA-3949-f494-cm99cnnvd
- https://packetstormsecurity.com/files/168657/Red-Hat-Security-Advisory-2022-6835-01.htmlcnnvd
- https://packetstormsecurity.com/files/169935/Red-Hat-Security-Advisory-2022-8524-01.htmlcnnvd
- https://www.auscert.org.au/bulletins/ESB-2022.5013cnnvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan