Skip to main content
No exploitation reportedFix available

CVE-2022-23647

No exploitation reported by the sources we read.

  • Published2022-02-18
  • Fixed in1.27.0
  • WeaknessCWE-79

Am I 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
  1. 2022-02-1815:15CVE publishedNVD

Versions per branch

NVD · OSV
Prismjs prism
BranchAffectedFixed in
1.x≥ 1.14.0, < 1.27.01.27.0

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 prism
    Affected
    • = >= 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

  • CVE-2022-23647 Red Hat Product Security2 products fixed · 5 known affected

    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

  • RHSA-2022:8524 Red Hat Product Security1 product fixed

    Red Hat Security Advisory: Red Hat Data Grid 8.4.0 security update

  • RHSA-2022:6835 Red Hat Product Security1 product fixed

    Red Hat Security Advisory: Service Registry (container images) release and security update [2.3.0.GA]

Full record on NVD

Fix

  1. Update Prismjs prism to 1.27.0
  2. 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…
  3. 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
  4. No fix available, says the vendor Red Hat Product Security CVE-2022-23647 · 1 productFix deferred
  5. No fix available, says the vendor Red Hat Product Security CVE-2022-23647 · 2 productsAffected
  6. No fix planned, says the vendor Red Hat Product Security CVE-2022-23647 · 1 productOut of support scope
  7. No fix planned, says the vendor Red Hat Product Security CVE-2022-23647 · 1 productWill not fix

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
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

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?

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.

Is CVE-2022-23647 actively exploited?

Active exploitation of CVE-2022-23647 has not been confirmed. Its EPSS score was 1.4% on 2026-12-04, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2022-23647?

CVE-2022-23647 has a CVSS v3 base score of 6.1 (Medium severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.

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

Sources for this record