CVE-2021-32723 json
Regular Expression Denial of Service (ReDoS) in Prism
published 2021-06-28 5 y ago modified 2026-07-08 4 mo ago also GHSA-gj77-59wh-66hg , EUVD-2021-1326
- cvss
- 7.4
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.4%
- EPSS 1.4% chance of exploitation in 30 days, percentile 73%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm prismjs 1.24.0
- prismjs prism 1.24.0
- oracle application_express 21.1.4
- github.com/PrismJS/prism@d85e30d commit
- github.com/PrismJS/prism#2688 pull request
- github.com/PrismJS/prism#2774 pull request
- oracle.com/security-alerts/cpujan2022.html advisory
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-32723 updated cvss 6.5
npm-prismjs: a malicious (long) string will take a long time to highlight may result in ReDoS
-
Red Hat OpenShift Service Mesh 1 servicemesh-grafana, servicemesh-grafana-prometheusaffected: workaround, no fix planned “As a workaround, do not use ASCIIDoc or ERB to highlight untrusted text.”
-
Red Hat OpenShift Service Mesh 2.0 servicemesh-grafana, servicemesh-grafana-prometheus Red Hat Advanced Cluster Security 3 roxaffected: workaround, no fix available “As a workaround, do not use ASCIIDoc or ERB to highlight untrusted text.”
-
Red Hat Ceph Storage 3 grafana Red Hat OpenShift Container Platform 3.11 openshift3/grafanaaffected: workaround, no fix planned “As a workaround, do not use ASCIIDoc or ERB to highlight untrusted text.”
-
Red Hat OpenShift Container Platform 4 openshift4/ose-grafanaaffected: workaround, no fix available “As a workaround, do not use ASCIIDoc or ERB to highlight untrusted text.”
-
Red Hat Ceph Storage 4 rhceph/rhceph-4-dashboard-rhel8not affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
1.42% chance of exploitation in the next 30 days, higher than 73% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:N/A:H |
| NVD | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
| NVD | 2.0 | 4.3 | AV:N/AC:M/Au:N/C:N/I:N/A:P |
| GitHub | 3.1 | 7.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | prismjs | <1.24.0 |
1.24.0 |
Affected products
- PrismJS prism
Classification
- Weakness
-
- CWE-400 Uncontrolled Resource Consumption
References
-
github.com
/PrismJS/prism/pull/2688
web, patch, third-party-advisory
-
github.com
/PrismJS/prism/pull/2774
web, patch, third-party-advisory
-
oracle.com
/security-alerts/cpujan2022.html
web, patch, third-party-advisory
-
github.com
/PrismJS/prism/commit/d85e30da6755fdbe7f8559f8e75d122297167018
web
-
github.com
/PrismJS/prism/security/advisories/GHSA-gj77-59wh-66hg
web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-32723
advisory
-
github.com
/PrismJS/prism
package
Sources
- CVE List CVE-2021-32723
- GitHub Advisory GHSA-gj77-59wh-66hg
- NVD CVE-2021-32723
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.