Vulnerability · Published Mar 4, 2021 · Assigned by snyk
CVE-2021-23346Regular Expression Denial of Service (ReDoS)
Medium 4.8
In plain English
A medium-severity security flaw in html-parse-stringify. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 2.1% (higher than 82% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Severity (CVSS 3.1)4.8Medium
Exploit odds (30 days)2.1%top 18.0% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | html-parse-stringify | 2.0.1 | GHSA-545q-3fg6-48m7 |
| npm | html-parse-stringify2 | no fix listed | GHSA-545q-3fg6-48m7 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| n/a | html-parse-stringify | unspecified – before 2.0.1 |
| n/a | html-parse-stringify2 | 0 – before unspecified |
References
- https://snyk.io/vuln/SNYK-JS-HTMLPARSESTRINGIFY-1079306 x_refsource_MISC
- https://snyk.io/vuln/SNYK-JS-HTMLPARSESTRINGIFY2-1079307 x_refsource_MISC
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1080633 x_refsource_MISC
- https://github.com/rayd/html-parse-stringify2/blob/master/lib/parse.js%23L2 x_refsource_MISC
- https://github.com/HenrikJoreteg/html-parse-stringify/blob/master/lib/parse.js%23L2 x_refsource_MISC
- https://github.com/HenrikJoreteg/html-parse-stringify/commit/c7274a48e59c92b2b7e906fedf9065159e73fe12 x_refsource_MISC