CVE-2021-29060 Regular Expression Denial of Service (ReDOS)
Attackers can cause a denial of service in applications using the Color-String library by providing crafted invalid HWB strings that trigger excessive CPU usage.
- 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-29060?
CVE-2021-29060 is a medium-severity denial of service vulnerability in n/a, published on 21 Jun 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
A Regular Expression Denial of Service (ReDOS) vulnerability was discovered in Color-String version 1.5.5 and below which occurs when the application is provided and checks a crafted invalid HWB string.
Weakness: CWE-770
Which versions are affected by CVE-2021-29060?
2 open source packages ship an affected version, including color-string. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
color-string npm | All versions | 1.5.5 |
color-string npm | All versions | 1.5.5 |
Products include Color-String Project Color-String.
How do I fix CVE-2021-29060?
Upgrade color-string to 1.5.5 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-29060 being exploited?
There is no known exploitation of CVE-2021-29060 in the wild and no public exploit code.
Sources
Also known as CLSA-2026-1774570927, DEBIAN-CVE-2021-29060, GHSA-257v-vj4p-3w2h, UBUNTU-CVE-2021-29060.