CVE-2021-43308 Exponential ReDoS in markdown-link-extractor

Medium 5.9 Published Updated

An attacker can cause a denial of service in applications using markdown-link-extractor by supplying malicious input that triggers exponential regex backtracking.

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

CVE-2021-43308 is a medium-severity denial of service vulnerability in markdown-link-extractor, published on 1 Jun 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

An exponential ReDoS (Regular Expression Denial of Service) can be triggered in the markdown-link-extractor npm package, when an attacker is able to supply arbitrary input to the module's exported function

Weakness: CWE-1333

Which versions are affected by CVE-2021-43308?

4 open source packages ship an affected version, including markdown-link-extractor. It affects 1 product.

PackageAffectedFixed in
markdown-link-extractor npmAll versions3.0.2
markdown-link-extractor npmAll versions3.0.2
markdown-link-extractor npmFrom 4.0.04.0.1
markdown-link-extractor npmFrom 4.0.04.0.1

Products include Markdown-Link-Extractor Project Markdown-Link-Extractor.

How do I fix CVE-2021-43308?

Upgrade markdown-link-extractor to a fixed version for your release line: 3.0.2 or 4.0.1.

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-43308 being exploited?

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

Sources

Also known as GHSA-mmh6-m7v9-5956.

Is CVE-2021-43308 in your software?

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

Check your SBOMs for free