Quick answers
- Is CVE-2021-23341 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2021-23341 being exploited in the wild.
- How severe is CVE-2021-23341?
- Informational severity, with a CVSS score of 7.5, published 1 March 2021.
- Which products and versions are affected?
- prismjs (npm) SEMVER:introduced=0,fixed=1.23.0.
- Is there a fix for CVE-2021-23341?
- Yes. prismjs (npm): upgrade to 1.23.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2021-23341 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2021-23341?
- Check whether you run prismjs (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- prismjs (npm): upgrade to 1.23.0 or later
npm install prismjs@1.23.0
Technical details
The vulnerability is a Regular Expression Denial of Service (ReDoS) affecting multiple language components in PrismJS (prism-asciidoc, prism-rest, prism-tap, prism-eiffel, prism-batch). The root cause is the use of inefficient regular expressions with catastrophic backtracking behavior. An attacker can exploit this by submitting crafted code strings to syntax highlighting operations, causing excessive CPU consumption and application unresponsiveness. No authentication is required; the attack surface depends on whether user-supplied code is processed by PrismJS. The vulnerability was fixed in version 1.23.0.
Affected products
- PrismJS PrismJS before 1.23.0
Identifiers
- CVE-2021-23341
- GHSA-h4hr-7fg3-h35w
Timeline
- 2021-02-18: disclosed: NVD publication date
- 2021-03-01: disclosed: GitHub advisory publication date
- 2021-03-01: patched: Fixed in version 1.23.0
- 2021-02-24: other: GitHub reviewed and confirmed vulnerability