CVE-2021-32723
MEDIUM 6.5CVSS 3.1Regular Expression Denial of Service (ReDoS) in Prism
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.
- Published
- 28 Jun 2021
- Last modified
- 8 Jul 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-400
- Also known as
- GHSA-gj77-59wh-66hg
- Sources
- NVDJSONOSV GHSA-gj77-59wh-66hgJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:N/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 7.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:N/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 4.3 | AV:N/AC:M/Au:N/C:N/I:N/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | prismjs | prismcpe:2.3:a:prismjs:prism:*:*:*:*:*:node.js:*:* |
< 1.24.0 | 1.24.0 |
| NVD | oracle | application_expresscpe:2.3:a:oracle:application_express:*:*:*:*:*:*:*:* |
< 21.1.4 | 21.1.4 |
| OSV | npm | prismjs | < 1.24.0 | 1.24.0 |
References
- https://github.com/PrismJS/prism/pull/2688 · Patch, Third Party Advisory, WEB
- https://github.com/PrismJS/prism/pull/2774 · Patch, Third Party Advisory, WEB
- https://github.com/PrismJS/prism/security/advisories/GHSA-gj77-59wh-66hg · Third Party Advisory, WEB
- https://www.oracle.com/security-alerts/cpujan2022.html · Patch, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-32723 · ADVISORY
- https://github.com/PrismJS/prism/commit/d85e30da6755fdbe7f8559f8e75d122297167018 · WEB
- https://github.com/PrismJS/prism · PACKAGE
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 28 Jun 2021)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 28 Jun 2021)