CVE-2021-23567
JSON

7.5high

Denial of Service (DoS)

Severity
7.5high CVSS:3.1 by snyk
Exploit likelihood
1.79% (higher than 79% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
snyk
Also known as
GHSA-gh88-3pxp-6fm8

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

Product or packageVersionsReported by
colorsfrom next of 1.4.0 before unspecifiedCVE List
colors (npm)from 1.4.1GitHub Advisory Database
colors.js_project colors.js1.4.1, 1.4.44-liberty-2NVD

All scores

snyk7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD5.0medium CVSS:2.0AV:N/AC:L/Au:N/C:N/I:N/A:P

Classification

What each source says

CVE List

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

NVD (es)

package colors versiones posteriores a 1.4.0, son vulnerables a una denegación de servicio (DoS) que es introducida mediante un bucle infinito en el módulo americanFlag. Desafortunadamente, esto parece haber sido un intento intencionado por parte de un mantenedor de colors para hacer el paquete inusable, los controles de otros mantenedores sobre este paquete parecen haber sido revocados en un intento de evitar que arreglen el problema. Código vulnerable js for (let i = 666; i &lt; Infinity; i++;) { Remediación alternativa sugerida * Fijar la dependencia a versión 1.4.0

References

https://snyk.io/vuln/SNYK-JS-COLORS-2331906exploit, third-party-advisory, web
https://github.com/Marak/colors.js/commit/074a0f8ed0c31c35d13d28632bd8a049ff136fb6%23diff-92bbac9a308cd5fcf9db165841f2d90ce981baddcb2b1e26cfff170929af3bd1R18patch, third-party-advisory, web
https://github.com/Marak/colors.js/issues/285exploit, issue-tracking, third-party-advisory, web
https://github.com/Marak/colors.js/issues/285%23issuecomment-1008212640exploit, issue-tracking, third-party-advisory, web
https://snyk.io/blog/open-source-maintainer-pulls-the-plug-on-npm-packages-colors-and-faker-now-what/exploit, mitigation, third-party-advisory
https://nvd.nist.gov/vuln/detail/CVE-2021-23567advisory
https://github.com/Marak/colors.jspackage
https://snyk.io/blog/open-source-maintainer-pulls-the-plug-on-npm-packages-colors-and-faker-now-whatweb

Sources

SourceRecordLicence
CVE ListCVE-2021-23567 changed 2024-09-16CVE Terms of Use
GitHub Advisory DatabaseGHSA-gh88-3pxp-6fm8 changed 2026-03-13CC-BY-4.0
NVDCVE-2021-23567 changed 2026-06-17Public domain