# CVE-2021-32723: Regular Expression Denial of Service (ReDoS) in Prism

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.4
- **CVSS:** 7.4 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: Required; Scope: Changed (impact reaches other components); Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 1.42% (percentile 73, 2026-11-26)
- **CWE:** CWE-400
- **Aliases:** GHSA-gj77-59wh-66hg
- **Published:** 2021-06-28T18:33:18.000Z
- **Modified:** 2026-07-08T06:28:40.129Z

## Who should check

- Projects that depend on npm package prismjs (\< 1.24.0)
- Anyone running PrismJS prism \< 1.24

## Description

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.

## Affected and fixed versions

- npm `prismjs`: affected \< 1.24.0; fixed 1.24.0 (osv)
- PrismJS prism: \< 1.24 (cvelist)

## Mitigation

- Upgrade prismjs to 1.24.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2021-32723. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-32723.md
Affected: prismjs < 1.24.0
Fixed in: 1.24.0

Steps:
1. Search this machine and project for prismjs (npm), PrismJS prism: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2021-32723 being exploited?

There is no confirmed exploitation: CVE-2021-32723 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.42% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2021-32723?

High: CVSS 7.4 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2021-32723?

prismjs \< 1.24.0.

### Is there a fix for CVE-2021-32723?

Yes. Fixed in 1.24.0. Upgrade prismjs to 1.24.0 or later.

### How do I check if I'm affected by CVE-2021-32723?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/PrismJS/prism/security/advisories/GHSA-gj77-59wh-66hg>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2021-32723>
- patch: <https://github.com/PrismJS/prism/pull/2688>
- patch: <https://github.com/PrismJS/prism/pull/2774>
- patch: <https://www.oracle.com/security-alerts/cpujan2022.html>
- patch: <https://github.com/PrismJS/prism/commit/d85e30da6755fdbe7f8559f8e75d122297167018>
- other: <https://github.com/PrismJS/prism>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-32723>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-gj77-59wh-66hg> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2021-32723> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-32723>
