Vulnerability Details : 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.
Vulnerability category: Cross site scripting (XSS)
Products affected by CVE-2022-23647
- cpe:2.3:a:prismjs:prism:*:*:*:*:*:node.js:*:*
Exploit prediction scoring system (EPSS) score for CVE-2022-23647
0.10%
Probability of exploitation activity in the next 30 days
EPSS Score History
~ 42 %
Percentile, the proportion of vulnerabilities that are scored at or less
CVSS scores for CVE-2022-23647
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source | First Seen |
---|---|---|---|---|---|---|
4.3
|
MEDIUM | AV:N/AC:M/Au:N/C:N/I:P/A:N |
8.6
|
2.9
|
NIST | |
6.1
|
MEDIUM | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
2.8
|
2.7
|
NIST | |
7.5
|
HIGH | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:L |
1.6
|
5.3
|
GitHub, Inc. |
CWE ids for CVE-2022-23647
-
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.Assigned by: security-advisories@github.com (Primary)
References for CVE-2022-23647
-
https://github.com/PrismJS/prism/commit/e002e78c343154e1c0ddf9d6a0bb85689e1a5c7c
Command Line: Escape markup in command line output (#3341) · PrismJS/prism@e002e78 · GitHubPatch;Third Party Advisory
-
https://github.com/PrismJS/prism/pull/3341
Command Line: Escape markup in command line output by at055612 · Pull Request #3341 · PrismJS/prism · GitHubPatch;Third Party Advisory
-
https://github.com/PrismJS/prism/security/advisories/GHSA-3949-f494-cm99
XSS vulnerability in the Command line plugin in prismjs · Advisory · PrismJS/prism · GitHubThird Party Advisory
Jump to