Quick answers
- Is CVE-2021-3801 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2021-3801 being exploited in the wild.
- How severe is CVE-2021-3801?
- Low severity, with a CVSS score of 3.1, published 20 September 2021.
- Which products and versions are affected?
- prismjs (npm) SEMVER:introduced=0,fixed=1.25.0.
- Is there a fix for CVE-2021-3801?
- Yes. prismjs (npm): upgrade to 1.25.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2021-3801 attacked?
- It is attacked over the network.
- Am I affected by CVE-2021-3801?
- 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.25.0 or later
npm install prismjs@1.25.0
Technical details
The vulnerability is a regular expression denial of service (ReDoS) in the Markup language component of PrismJS. The vulnerable regex pattern in HTML comment parsing contains catastrophic backtracking that can be triggered by a specially crafted HTML comment input. An attacker who can control HTML input processed by PrismJS (e.g., via user comments, imported content, or markdown processing) can cause the application to hang or consume excessive CPU resources. The fix was patched in version 1.25.0 by correcting the regex pattern to eliminate the backtracking vulnerability.
Affected products
- PrismJS prismjs before 1.25.0
Identifiers
- CVE-2021-3801
- GHSA-hqhp-5p83-hx96
Timeline
- 2021-09-15: disclosed: NVD published
- 2021-09-20: advisory: GitHub Security Advisory published
- 2021-09-16: patched: Fix released in version 1.25.0