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

Medium 5.3 Published Updated

Attackers can cause denial of service in applications using the path-parse library by triggering polynomial time complexity in regular expressions.

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-23343?

CVE-2021-23343 is a medium-severity denial of service vulnerability in path-parse, published on 4 May 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

All versions of package path-parse are vulnerable to Regular Expression Denial of Service (ReDoS) via splitDeviceRe, splitTailRe, and splitPathRe regular expressions. ReDoS exhibits polynomial worst-case time complexity.

Which versions are affected by CVE-2021-23343?

2 open source packages ship an affected version, including path-parse. It affects 1 product.

PackageAffectedFixed in
path-parse npmAll versions1.0.7
path-parse npmAll versions1.0.7

Products include Path-Parse Project Path-Parse.

How do I fix CVE-2021-23343?

Upgrade path-parse to 1.0.7 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-23343 being exploited?

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

Sources

Also known as GHSA-hj48-42vr-x3v9, OESA-2021-1262.

Is CVE-2021-23343 in your software?

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

Check your SBOMs for free