Prism is a syntax highlighting library. Some languages before 1.24.0 are vulnerable to Regular Expression Denial of Service (ReDoS). When Prism is used to highlight untrusted (user-given) text, an attacker can craft a string that will take a very very long time to highlight. This problem has been fixed in Prism v1.24. As a workaround, do not use ASCIIDoc or ERB to highlight untrusted text. Other languages are not affected and can be used to highlight untrusted text.
CVE-2021-32723 - High Severity Vulnerability
Vulnerable Libraries - prism-asciidoc-1.23.0.js, prism-perl-1.23.0.js
prism-asciidoc-1.23.0.js
Lightweight, robust, elegant syntax highlighting. A spin-off project from Dabblet.
Library home page: https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/components/prism-asciidoc.js
Path to vulnerable library: /finos-fo/website/node_modules/prismjs/components/prism-asciidoc.js
Dependency Hierarchy: - :x: **prism-asciidoc-1.23.0.js** (Vulnerable Library)
prism-perl-1.23.0.js
Lightweight, robust, elegant syntax highlighting. A spin-off project from Dabblet.
Library home page: https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/components/prism-perl.js
Path to vulnerable library: /finos-fo/website/node_modules/prismjs/components/prism-perl.js
Dependency Hierarchy: - :x: **prism-perl-1.23.0.js** (Vulnerable Library)
Found in base branch: master
Vulnerability Details
Prism is a syntax highlighting library. Some languages before 1.24.0 are vulnerable to Regular Expression Denial of Service (ReDoS). When Prism is used to highlight untrusted (user-given) text, an attacker can craft a string that will take a very very long time to highlight. This problem has been fixed in Prism v1.24. As a workaround, do not use ASCIIDoc or ERB to highlight untrusted text. Other languages are not affected and can be used to highlight untrusted text.
Publish Date: 2021-06-28
URL: CVE-2021-32723
CVSS 3 Score Details (7.4)
Base Score Metrics: - Exploitability Metrics: - Attack Vector: Network - Attack Complexity: Low - Privileges Required: None - User Interaction: Required - Scope: Changed - Impact Metrics: - Confidentiality Impact: None - Integrity Impact: None - Availability Impact: High
For more information on CVSS3 Scores, click here.Suggested Fix
Type: Upgrade version
Origin: https://github.com/PrismJS/prism/security/advisories/GHSA-gj77-59wh-66hg
Release Date: 2021-06-28
Fix Resolution: prismjs - 1.24.0