CVE-2022-23647 Cross-site Scripting in Prism
- 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.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| 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
| Product | Affected versions | Fixed 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
- github.com issue-tracking third-party-advisory vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com issue-tracking patch third-party-advisory
- github.com issue-tracking patch third-party-advisory
- github.com
- Debian Security Tracker CVE-2022-23647 vendor-advisory
- Ubuntu CVE tracker issue-tracking vendor-advisory
- www.cve.org issue-tracking
- github.com product
- github.com issue-tracking