Skip to content

CVE-2022-23647 Cross-site Scripting in Prism

MediumCVSS 6.1 EPSS 1.4%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: partial
Technology
UbuntuDebian

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.

Upgrade path

7 packages: 5 fixed, 2 with no fix yet.

PackageAffectedFixed inStatus
ubuntu/node-prismjs(Ubuntu 20.04) = 1.11.0+dfsg-2; = 1.11.0+dfsg-3; All versions No fix listed No fix yet
ubuntu/node-prismjs(Ubuntu 22.04) = 1.23.0+dfsg-1; = 1.25.0+dfsg-1; = 1.27.0+dfsg+~1.26.0-1; All versions No fix listed No fix yet
debian/node-prismjs(Debian 12) < 1.27.0+dfsg+~1.26.0-1 1.27.0+dfsg+~1.26.0-1 Fixed
debian/node-prismjs(Debian 13) < 1.27.0+dfsg+~1.26.0-1 1.27.0+dfsg+~1.26.0-1 Fixed
debian/node-prismjs(Debian 14) < 1.27.0+dfsg+~1.26.0-1 1.27.0+dfsg+~1.26.0-1 Fixed
npm prismjs(npm) >= 1.14.0, < 1.27.0 1.27.0 Fixed
PrismJS prism = >= 1.14.0, < 1.27.0; >= 1.14.0, < 1.27.0 1.27.0 Fixed

Affected products

ProductAffected versionsFixed in
npm prismjs(npm) >= 1.14.0, < 1.27.0 1.27.0
PrismJS prism = >= 1.14.0, < 1.27.0 No fix listed
ubuntu/node-prismjs(Ubuntu:22.04) All versions No fix listed
PrismJS prism >= 1.14.0, < 1.27.0 1.27.0
debian/node-prismjs(Debian:12) < 1.27.0+dfsg+~1.26.0-1 1.27.0+dfsg+~1.26.0-1
debian/node-prismjs(Debian:14) < 1.27.0+dfsg+~1.26.0-1 1.27.0+dfsg+~1.26.0-1
debian/node-prismjs(Debian:13) < 1.27.0+dfsg+~1.26.0-1 1.27.0+dfsg+~1.26.0-1
ubuntu/node-prismjs(Ubuntu:20.04) All versions No fix listed
ubuntu/node-prismjs(Ubuntu:20.04) = 1.11.0+dfsg-2 No fix listed
ubuntu/node-prismjs(Ubuntu:20.04) = 1.11.0+dfsg-3 No fix listed
ubuntu/node-prismjs(Ubuntu:22.04) = 1.23.0+dfsg-1 No fix listed
ubuntu/node-prismjs(Ubuntu:22.04) = 1.25.0+dfsg-1 No fix listed
ubuntu/node-prismjs(Ubuntu:22.04) = 1.27.0+dfsg+~1.26.0-1 No fix listed

References