CVE-2021-23346 Regular Expression Denial of Service (ReDoS)
An attacker can cause a denial of service by sending specific input that triggers excessive backtracking in the HTML parsing 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-23346?
CVE-2021-23346 is a medium-severity denial of service vulnerability in html-parse-stringify, published on 4 Mar 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
This affects the package html-parse-stringify before 2.0.1; all versions of package html-parse-stringify2. Sending certain input could cause one of the regular expressions that is used for parsing to backtrack, freezing the process.
Which versions are affected by CVE-2021-23346?
4 open source packages ship an affected version, including html-parse-stringify and html-parse-stringify2. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
html-parse-stringify npm | All versions | 2.0.1 |
html-parse-stringify npm | All versions | 2.0.1 |
html-parse-stringify2 npm | All versions to 2.0.1 | None |
html-parse-stringify2 npm | All versions to 2.0.1 | None |
Products include Html-Parse-Stringify Project Html-Parse-Stringify.
How do I fix CVE-2021-23346?
Upgrade html-parse-stringify to 2.0.1 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-23346 being exploited?
There is no known exploitation of CVE-2021-23346 in the wild and no public exploit code.
Sources
Also known as GHSA-545q-3fg6-48m7.