CVE-2021-32723

Regular Expression Denial of Service (ReDoS) in Prism

MEDIUM
6.5
CVSS Score
Published: June 28, 2021 at 07:15 PM UTC
Updated: June 17, 2026 at 03:53 AM UTC
2 products affected across 2 vendorsApplication ExpressPrism

Using prism by PrismJS?

Get instant alerts when new vulnerabilities affect prism - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM6.5
Exploit prediction
EPSS 1%

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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 21.1.4
Affected range stops below 21.1.4, so it looks safe — our inference, not a vendor statement
v < 1.24v < 1.24.0
Affected range stops below 1.24, so it looks safe — our inference, not a vendor statement
Affected range stops below 1.24.0, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (4)

x_refsource_MISCPatchThird Party Advisory
https://github.com/PrismJS/prism/pull/2688
x_refsource_MISCPatchThird Party Advisory
https://github.com/PrismJS/prism/pull/2774
x_refsource_MISCPatchThird Party Advisory
https://www.oracle.com/security-alerts/cpujan2022.html

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-400

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card