CVE-2021-29060
Regular Expression Denial of Service (ReDOS)
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- Low
Exploit likelihood
What each source reports
NVD Score used
5.3
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.
- Record
CVE-2021-29060- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - CVSS 2.0
- 5.0 Medium
AV:N/AC:L/Au:N/C:N/I:N/A:P - Weakness
- CWE-770
- Updated
- 2026-11-02
CVE List No score
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.
- Record
CVE-2021-29060- Updated
- 2026-11-02
EUVDEUVD-2021-1238 No score
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.
- Record
EUVD-2021-1238- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-257v-vj4p-3w2h
5.3
Regular Expression Denial of Service (ReDOS)
In the npm package color-string, there is a ReDos (Regular Expression Denial of Service) vulnerability regarding an exponential time complexity for
linearly increasing input lengths for hwb() color strings.
Strings reaching more than 5000 characters would see several milliseconds of processing time; strings reaching more than 50,000 characters began seeing 1500ms (1.5s) of processing time.
The cause was due to a the regular expression that parses hwb() strings - specifically, the hue value - where the integer portion of the hue value used a 0-or-more quantifier shortly thereafter followed by a 1-or-more quantifier.
This caused excessive backtracking and a cartesian scan, resulting in exponential time complexity given a linear increase in input length.
- Record
GHSA-257v-vj4p-3w2h- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - Weakness
- CWE-770
- Updated
- 2026-11-02
OSV
5.3
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.
- Record
CVE-2021-29060- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - Updated
- 2026-11-02
OSVDEBIAN-CVE-2021-29060
5.3
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.
- Record
DEBIAN-CVE-2021-29060- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - Updated
- 2026-11-02
OSVGHSA-257v-vj4p-3w2h
5.3
Regular Expression Denial of Service (ReDOS)
In the npm package color-string, there is a ReDos (Regular Expression Denial of Service) vulnerability regarding an exponential time complexity for
linearly increasing input lengths for hwb() color strings.
Strings reaching more than 5000 characters would see several milliseconds of processing time; strings reaching more than 50,000 characters began seeing 1500ms (1.5s) of processing time.
The cause was due to a the regular expression that parses hwb() strings - specifically, the hue value - where the integer portion of the hue value used a 0-or-more quantifier shortly thereafter followed by a 1-or-more quantifier.
This caused excessive backtracking and a cartesian scan, resulting in exponential time complexity given a linear increase in input length.
- Record
GHSA-257v-vj4p-3w2h- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - Weakness
- CWE-770
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2021-29060
5.3
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.
- Record
UBUNTU-CVE-2021-29060- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - Updated
- 2026-11-02
OSVCLSA-2026-1774570927 No score
TuxCare security update for color-string (1 CVE)
TuxCare rebuilt color-string to address 1 CVE. Fixed in 0.3.0-tuxcare.1.
- Record
CLSA-2026-1774570927- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
color-stringnpm |
before 1.5.5 | 1.5.5 |
color-stringTuxCare:npm |
0.3.0-tuxcare.0 up to 0.3.0-tuxcare.1, plus listed versions 0.3.0 |
0.3.0-tuxcare.1 |
node-color-stringDebian:12 |
before 1.5.4-2 | 1.5.4-2 |
node-color-stringDebian:13 |
before 1.5.4-2 | 1.5.4-2 |
node-color-stringDebian:14 |
before 1.5.4-2 | 1.5.4-2 |
node-color-stringUbuntu:18.04:LTS |
All versions, plus listed versions 1.5.2-1 |
None known |
node-color-stringUbuntu:20.04:LTS |
All versions, plus listed versions 1.5.2-1 |
None known |
node-color-stringUbuntu:22.04:LTS |
All versions, plus listed versions 1.5.4-2 |
None known |
node-color-stringUbuntu:24.04:LTS |
All versions, plus listed versions 1.9.1-2 |
None known |
node-color-stringUbuntu:25.10 |
All versions, plus listed versions 1.9.1-2 |
None known |
node-color-stringUbuntu:26.10 |
All versions, plus listed versions 1.9.1-2 |
None known |
node-color-stringUbuntu:26.04:LTS |
All versions, plus listed versions 1.9.1-2 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-29060 is a medium vulnerability (CVSS 5.3) in Color-string Project Color-string, published June 21, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 3.13%, the 87th percentile. Fixed in color-string 1.5.5.
References
github.com/yetingli/SaveResults/blob/main/js/color-string.js
github.com/Qix-/color-string/commit/0789e21284c33d89ebc4ab4ca6f759b9375ac9d3
npmjs.com/package/color-string
github.com/yetingli/PoCs/blob/main/CVE-2021-29060/Color-String.md
nvd.nist.gov/vuln/detail/CVE-2021-29060
github.com/Qix-/color-string/releases/tag/1.5.5