# CVE-2021-23567: Denial of Service (DoS)

- Severity: High 7.5 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.79%, higher than 79% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 4 links below, marked "exploit"
- Published: 2022-01-14T20:05:12.771Z
- Modified: 2026-06-17T03:38:49.937Z
- Also known as: GHSA-gh88-3pxp-6fm8
- Weaknesses: CWE-835
- Assigned by: snyk

## 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

(As written by CVE List.)

## Affected

- colors: from next of 1.4.0 before unspecified
- colors (npm): from 1.4.1
- colors.js_project colors.js: 1.4.1; 1.4.44-liberty-2

## Every score

- snyk: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:N/A:P`

## References

- <https://snyk.io/vuln/SNYK-JS-COLORS-2331906> (exploit, third-party-advisory, web)
- <https://github.com/Marak/colors.js/issues/285> (exploit, issue-tracking, third-party-advisory, web)
- <https://github.com/Marak/colors.js/issues/285%23issuecomment-1008212640> (exploit, 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://github.com/Marak/colors.js/commit/074a0f8ed0c31c35d13d28632bd8a049ff136fb6%23diff-92bbac9a308cd5fcf9db165841f2d90ce981baddcb2b1e26cfff170929af3bd1R18> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-23567> (advisory)
- <https://github.com/Marak/colors.js> (package)
- <https://snyk.io/blog/open-source-maintainer-pulls-the-plug-on-npm-packages-colors-and-faker-now-what> (web)

## Sources

- CVE List: [CVE-2021-23567](https://www.cve.org/CVERecord?id=CVE-2021-23567), CVE Terms of Use, modified 2024-09-16
- GitHub Advisory Database: [GHSA-gh88-3pxp-6fm8](https://github.com/advisories/GHSA-gh88-3pxp-6fm8), CC-BY-4.0, modified 2026-03-13
- NVD: [CVE-2021-23567](https://nvd.nist.gov/vuln/detail/CVE-2021-23567), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-23567 · Whole record: https://cve.day/CVE-2021-23567.json · Rebuilt by cve.day 2026-11-25T22:58:06.537Z
