NodeJS/colors/1.4.1
get colors in your node.js console
https://www.npmjs.com/package/colors
MIT
2 Security Vulnerabilities
Infinite Loop in colors
- https://github.com/Marak/colors.js/commit/074a0f8ed0c31c35d13d28632bd8a049ff136fb6
- https://github.com/Marak/colors.js/commit/137c6dae3339e97f4bbc838c221803c363b0a9fd
- https://github.com/Marak/colors.js/commit/5d2d242f656103ac38086d6b26433a09f1c38c75
- https://github.com/Marak/colors.js/commit/6bc50e79eeaa1d87369bb3e7e608ebed18c5cf26
- https://www.bleepingcomputer.com/news/security/dev-corrupts-npm-libs-colors-and-faker-breaking-thousands-of-apps/
- https://github.com/advisories/GHSA-5rqg-jm4f-cqx7
Colors is a library for including colored text in node.js consoles. On 07 January 2022, `colors versions 1.4.1, 1.4.2, and 1.4.44-liberty-2 were modified to include malicious code that caused an infinite loop. Users with applications dependent on these versions experienced their apps printing nonsensical messages to console and breaking entirely.
The changes appeared in the GitHub repository as a “new American flag module” that, in actuality, printed the word “LIBERTY” multiple times followed by non-ASCII text.
Users of colors should downgrade to version 1.4.0.
Infinite Loop in colors.js
- https://nvd.nist.gov/vuln/detail/CVE-2021-23567
- https://github.com/Marak/colors.js/issues/285
- https://github.com/Marak/colors.js/issues/285%23issuecomment-1008212640
- https://github.com/Marak/colors.js/commit/074a0f8ed0c31c35d13d28632bd8a049ff136fb6%23diff-92bbac9a308cd5fcf9db165841f2d90ce981baddcb2b1e26cfff170929af3bd1R18
- https://snyk.io/blog/open-source-maintainer-pulls-the-plug-on-npm-packages-colors-and-faker-now-what/
- https://snyk.io/vuln/SNYK-JS-COLORS-2331906
- https://github.com/advisories/GHSA-gh88-3pxp-6fm8
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
29 Other Versions
| Version | License | Security | Released | |
|---|---|---|---|---|
| 1.4.44-liberty-2 | MIT | 2 | 2022-01-08 - 04:24 | over 4 years |
| 1.4.2 | MIT | 2 | 2022-01-09 - 19:35 | over 4 years |
| 1.4.1 | MIT | 2 | 2022-01-08 - 19:22 | over 4 years |
| 1.4.0 | MIT | 2019-09-22 - 23:46 | over 6 years | |
| 1.3.3 | MIT | 2018-12-10 - 01:35 | over 7 years | |
| 1.3.2 | MIT | 2018-08-22 - 18:48 | almost 8 years | |
| 1.3.1 | MIT | 2018-07-22 - 22:06 | almost 8 years | |
| 1.3.0 | MIT | 2018-05-20 - 22:09 | about 8 years | |
| 1.2.5 | MIT | 2018-05-11 - 06:15 | about 8 years | |
| 1.2.4 | MIT | 2018-05-05 - 00:56 | about 8 years | |
| 1.2.3 | MIT | 2018-04-30 - 22:09 | about 8 years | |
| 1.2.2 | MIT | 2018-04-30 - 18:42 | about 8 years | |
| 1.2.1 | MIT | 2018-03-12 - 05:52 | over 8 years | |
| 1.2.0 | MIT | 2018-03-10 - 06:48 | over 8 years | |
| 1.2.0-rc0 | MIT | 2018-02-16 - 22:45 | over 8 years | |
| 1.1.2 | MIT | 2015-06-17 - 13:03 | about 11 years | |
| 1.1.1 | MIT | 2015-06-17 - 12:52 | about 11 years | |
| 1.1.0 | MIT | 2015-04-29 - 07:15 | about 11 years | |
| 1.0.3 | MIT | 2014-10-09 - 10:03 | over 11 years | |
| 1.0.2 | MIT | 2014-10-02 - 19:55 | over 11 years | |
| 1.0.1 | MIT | 2014-10-01 - 16:07 | over 11 years | |
| 1.0.0 | MIT | 2014-10-01 - 11:29 | over 11 years | |
| 0.6.2 | MIT | 2013-08-21 - 23:14 | almost 13 years | |
| 0.6.1 | MIT | 2013-07-26 - 05:49 | almost 13 years | |
| 0.6.0 | MIT | 2011-12-09 - 11:32 | over 14 years | |
| 0.6.0-1 | MIT | 2011-12-09 - 12:35 | over 14 years | |
| 0.5.1 | MIT | 2011-09-25 - 13:04 | over 14 years | |
| 0.5.0 | MIT | 2011-03-15 - 10:12 | over 15 years | |
| 0.3.0 | MIT | 2011-03-15 - 10:12 | over 15 years |
