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

CVE-2021-23567 — colors

HIGHFix: Marak/colors.js@074a0f8

CVE-2021-23567 is a high-severity (CVSS 7.5) CWE-835 vulnerability in colors. 4 public exploit or proof-of-concept references are indexed, so weaponization risk is real. The records list no fixed version yet; check the vendor advisory below and apply the mitigations in the meantime.

Infinite Loop in colors.js

Published
Updated
Affected
1 pkg
Patched
See advisory
Exploits
4 known
Exploitation data as of Nov 23, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
1.8%probability of exploitation in next 30 days
Lower Risk+0.06%
Lower risk than most CVEs79th percentile — riskier than 79% of all scored CVEsHighest risk
0.09%0.82%1.56%2.29%0.6%1.8%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.

22Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
colorsnpm
30.6Mdownloads / week

Description

The package colors after 1.4.0 are vulnerable to Denial of Service (DoS) that was introduced through an infinite loop in the americanFlag module. Unfortunately this appears to have been a purposeful attempt by a maintainer of colors to make the package unusable, other maintainers' controls over this package appear to have been revoked in an attempt to prevent them from fixing the issue. Vulnerable Code js for (let i = 666; i < Infinity; i++;) { Alternative Remediation Suggested * Pin dependancy to 1.4.0

Affected Packages

1 total
EcosystemPackageVulnerable rangeFix
📦npmcolors≥ 1.4.1No fix

Affected Products

1 product · 2 configurations
Application
colors.jscolors.js_project
2 versions
1.4.11.4.44-liberty-2
Exploits & PoCs
4

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 colors, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Remediation status

    The records we use list no patched version of colors for CVE-2021-23567. Check the maintainer's advisory, and where your build allows, override or pin the dependency away from the vulnerable range.

  3. Mitigate without a patch

    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

The package colors after 1.4.0 are vulnerable to Denial of Service (DoS) that was introduced through an infinite loop in the americanFlag module. Unfortunately this appears to have been a purposeful attempt by a maintainer of colors to make the package unusable, other maintainers' controls over this package appear to have been revoked in an attempt to prevent them from fixing the issue. Vulnerable Code js for (let i = 666; i < Infinity; i++;) { Alternative Remediation Suggested * Pin dependancy to 1.4.0
O3 Security · Impact-Aware SCA

Is CVE-2021-23567 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2021-23567: colors: Infinite Loop