CVE-2022-23647
No exploitation reported by the sources we read.
- Published2022-02-18
- Fixed in1.27.0
- WeaknessCWE-79
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
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.
Timeline
dates in UTC- 2022-02-1815:15CVE publishedNVD
Versions per branch
NVD · OSV| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 1.x | ≥ 1.14.0, < 1.27.0 | 1.27.0 | NVD · OSV |
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Products declared by the CNA1 product
As GitHub_M, the CNA that assigned this CVE, declared them in the CVE record; versions as written.
- PrismJS prismAffected
- = >= 1.14.0, < 1.27.0no fix stated
Source: the CNA record (CVE Program), © The MITRE Corporation,CVE terms of useCVE recordupdated 2022-02-18
Distribution builds and vendor advisories
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- @rootio/prismjsRoot:npmall versions · fixed in 1.17.1-root.io.1
- @rootio/prismjsRoot:npmall versions · fixed in 1.27.0-root.io.1
- @rootio/prismjsRoot:npmall versions · fixed in 1.27.0-root.io.2
- node-prismjsUbuntu:22.04:LTSall versions · no fixed version listed
- node-prismjsUbuntu:20.04:LTSall versions · no fixed version listed
- node-prismjsDebian:14all versions · fixed in 1.27.0+dfsg+~1.26.0-1
- node-prismjsDebian:13all versions · fixed in 1.27.0+dfsg+~1.26.0-1
- node-prismjsDebian:12all versions · fixed in 1.27.0+dfsg+~1.26.0-1
3 more package ranges on OSV.dev
Vendor advisories
prismjs: improperly escaped output allows a XSS
odo.src as a component of OpenShift Developer Tools and Services · 3scale-amp2/apicast-rhel7-operator as a component of Red Hat 3scale API Management Platform 2 · 3scale-amp2/apicast-rhel7-operator-metadata as a component of Red Hat 3scale API Management Platform 2 · +2 more
Red Hat Security Advisory: Red Hat Data Grid 8.4.0 security update
Red Hat Security Advisory: Service Registry (container images) release and security update [2.3.0.GA]
Fix
- Update Prismjs prism to 1.27.0
- Vendor fix Red Hat Product Security RHSA-2022:8524 · 1 productTo install this update, do the following: 1. Download the Data Grid 8.4.0 Server patch from the customer portal[²]. 2. Back up your existing Data Grid installation. You should back up databases, configuration files, and so on. 3. Install the Data Grid 8.4.0 Server patch. 4. Restart Data Grid to e…
- Vendor fix Red Hat Product Security RHSA-2022:6835 · 1 productBefore applying this update, make sure all previously released errata relevant to your system have been applied. For details on how to apply this update, refer to: https://access.redhat.com/articles/11258
- No fix available, says the vendor Red Hat Product Security CVE-2022-23647 · 1 productFix deferred
- No fix available, says the vendor Red Hat Product Security CVE-2022-23647 · 2 productsAffected
- No fix planned, says the vendor Red Hat Product Security CVE-2022-23647 · 1 productOut of support scope
- No fix planned, says the vendor Red Hat Product Security CVE-2022-23647 · 1 productWill not fix
Advisories and patches
- github.comPatch
- github.comPatch
Detection
- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof of concept
- PoC-in-GitHubno public repository identifiedread 2026-12-04
- Metasploit modules
- none listed Metasploit Framework
Sources
- CISA-ADPSSVC decisionnone2025-04-23
- CNACVSS 3.17.5known since 2026-10-23
- NVDCVSS 3.16.1read 2026-10-23
- NVDCVSS 2.04.3read 2026-10-23
- CNAweakness (CWE)CWE-79known since 2026-10-23
- FIRST EPSSEPSS score1.4 %2026-12-04
- OSVaffected packages—
- GitHub AdvisoriesadvisoryHigh2022-02-22
Identifiers
- EUVD-2022-0785same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- GHSA-3949-f494-cm99same flawGitHub Advisory Database · CC-BY-4.0
Technical details
- CVSS v3 vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Published
- 2022-02-18
- Last modified
- 2026-06-17
- NVD status
- Modified
- GitHub advisory
- GHSA-3949-f494-cm99
Frequently asked questions
What is CVE-2022-23647?
Is CVE-2022-23647 actively exploited?
What is the CVSS score for CVE-2022-23647?
Running prismjs? Hear about its next vulnerability
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website checks · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- GitHub Advisory Database · CC-BY-4.0 · GHSA-3949-f494-cm99
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- Red Hat Product Security (CSAF and VEX) · CC-BY-4.0
- CISA Vulnrichment · CC0-1.0