CVE-2021-23341 Regular Expression Denial of Service (ReDoS)

High 7.5 Published Updated

Attackers can cause a denial of service in applications using PrismJS by exploiting inefficient regular expressions in specific language components.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-23341?

CVE-2021-23341 is a high-severity denial of service vulnerability in prismjs, published on 18 Feb 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

The package prismjs before 1.23.0 are vulnerable to Regular Expression Denial of Service (ReDoS) via the prism-asciidoc, prism-rest, prism-tap and prism-eiffel components.

Which versions are affected by CVE-2021-23341?

2 open source packages ship an affected version, including prismjs. It affects 1 product.

PackageAffectedFixed in
prismjs npmAll versions1.23.0
prismjs npmAll versions1.23.0

Products include Prismjs Prism.

How do I fix CVE-2021-23341?

Upgrade prismjs to 1.23.0 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2021-23341 being exploited?

There is no known exploitation of CVE-2021-23341 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2021-23341, GHSA-h4hr-7fg3-h35w, ROOT-APP-NPM-CVE-2021-23341, UBUNTU-CVE-2021-23341.

Is CVE-2021-23341 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free