Skip to content
Heist/ feed
Back to feed
MediumFix available

node-prismjs — security advisory

Type: advisorySources: OSVAdvisory ID: DEBIAN-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.

Products
node-prismjs
Affected versions
Not specified
Fixed versions
1.27.0+dfsg+~1.26.0-1
CVEs
CVE-2022-23647
Confirmed fixed CVEs
Not specified
Updated in this feed
30 Oct 2026, 14:43 UTC · Revision 1

Source evidence

DEBIAN-CVE-2022-23647

core-osv · Original source

Published 18 Feb 2022, 15:15 UTC

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.

osv:DEBIAN-CVE-2022-23647

node-prismjs

Fixed versions: 1.27.0+dfsg+~1.26.0-1

node-prismjs

Fixed versions: 1.27.0+dfsg+~1.26.0-1

node-prismjs

Fixed versions: 1.27.0+dfsg+~1.26.0-1

Complete source record
{
  "id": "3e663d9d3fda15146b8172f860dab25de5611965c377ee82b09505228f0e2860",
  "url": "https://osv.dev/vulnerability/DEBIAN-CVE-2022-23647",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DEBIAN-CVE-2022-23647",
    "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.",
    "evidence": "osv:DEBIAN-CVE-2022-23647",
    "products": [
      {
        "name": {
          "value": "node-prismjs",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.27.0+dfsg+~1.26.0-1",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "node-prismjs",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.27.0+dfsg+~1.26.0-1",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "node-prismjs",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.27.0+dfsg+~1.26.0-1",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "DEBIAN-CVE-2022-23647",
      "aliases": [
        "DEBIAN-CVE-2022-23647"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.27.0+dfsg+~1.26.0-1"
                }
              ]
            }
          ],
          "package": {
            "name": "node-prismjs",
            "purl": "pkg:deb/debian/node-prismjs?arch=source&distro=bookworm",
            "ecosystem": "Debian:12"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-23647.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.27.0+dfsg+~1.26.0-1"
                }
              ]
            }
          ],
          "package": {
            "name": "node-prismjs",
            "purl": "pkg:deb/debian/node-prismjs?arch=source&distro=trixie",
            "ecosystem": "Debian:13"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-23647.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.27.0+dfsg+~1.26.0-1"
                }
              ]
            }
          ],
          "package": {
            "name": "node-prismjs",
            "purl": "pkg:deb/debian/node-prismjs?arch=source&distro=forky",
            "ecosystem": "Debian:14"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-23647.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        }
      ],
      "modified": "2026-10-15T08:01:43.671282654Z",
      "provider": "osv",
      "upstream": [
        "CVE-2022-23647"
      ],
      "references": [
        "https://security-tracker.debian.org/tracker/CVE-2022-23647"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2022-23647",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 323114,
  "published_at": "2022-02-18T15:15:07.74+00:00"
}