NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
MEDIUM severity

CVE-2021-29060 — color-string

MEDIUMFix: Qix-/color-string@0789e21

CVE-2021-29060 is a medium-severity (CVSS 5.3) CWE-770 vulnerability in color-string. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for color-string — see the affected versions and patch details below.

Regular Expression Denial of Service (ReDOS)

Also known asGHSA-257v-vj4p-3w2h
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
1 known
Exploitation data as of Nov 6, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
3.1%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs88th percentile — riskier than 88% of all scored CVEsHighest risk
0.00%1.32%2.65%3.97%0.3%3.1%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

427other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
color-stringnpm
75.8Mdownloads / week

Description

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.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmcolor-stringall versions1.5.5npm install color-string@1.5.5

Affected Products

1 product · 1 configurations
Application
color-stringcolor-string_project
< 1.5.5
range
Exploits & PoCs
1

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for color-string, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update color-string to 1.5.5 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-29060 is resolved across your whole dependency graph.

  3. Workarounds

    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.

Frequently Asked Questions

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 follow
O3 Security · Impact-Aware SCA

Is CVE-2021-29060 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2021-29060: color-string DoS — Fixed in 1.5.5