
Cloud Vulnerability DB
A community-led vulnerabilities database
The colors package after version 1.4.0 was found to contain a Denial of Service (DoS) vulnerability (CVE-2021-23567) that was intentionally introduced through an infinite loop in the americanFlag module. The vulnerability was discovered and disclosed on January 9, 2022, affecting the popular npm package that receives over 20 million downloads weekly and is used by more than 4 million projects (Snyk Blog).
The vulnerability was introduced in version 1.4.1 through malicious code that implements an infinite loop, which triggers immediately upon package initialization. The vulnerable code contains a for loop starting from 666 that runs indefinitely, causing the application to become unresponsive. The CVSS score for this vulnerability is 7.5 (High), with the attack vector being Network, attack complexity Low, and requiring no privileges or user interaction (Snyk Vuln).
The vulnerability results in a complete Denial of Service, causing total loss of availability for any Node.js server using the affected versions of the package. The impact is particularly significant given the package's widespread use, affecting thousands of dependent packages and millions of projects (Snyk Blog).
Users are recommended to revert to colors@1.4.0, which is the last known-good version without the infinite loop code. It is advised to pin dependencies in package.json or use a lockfile to prevent automatic updates to vulnerable versions. Additionally, users should consider migrating to alternative packages such as chalk (Snyk Blog).
The incident was part of a broader discussion about open source sustainability, as the maintainer intentionally introduced the vulnerability. This action followed similar incidents with other packages maintained by the same developer, notably faker.js, highlighting ongoing tensions regarding the sustainability and funding models of open source projects (Snyk Blog).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."