# CVE-2021-3807: Inefficient Regular Expression Complexity in chalk/ansi-regex

- Severity: High 7.5 (CVSS:3.0, scored by @huntrdev) `CVSS:3.0/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): 3.55%, higher than 89% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-09-17T00:00:00.000Z
- Modified: 2026-10-08T22:17:11.557Z
- Also known as: GHSA-93q8-gq69-wqmw
- Weaknesses: CWE-697, CWE-1333
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: @huntrdev

## Description

ansi-regex is vulnerable to Inefficient Regular Expression Complexity

(As written by CVE List.)

## Affected

- chalk chalk/ansi-regex: from unspecified before 6.0.1; from unspecified before 5.0.1 (not affected: 5.0.1)
- ansi-regex (npm): from 6.0.0 before 6.0.1; from 5.0.0 before 5.0.1; from 4.0.0 before 4.1.1; from 3.0.0 before 3.0.1
- ansi-regex_project ansi-regex: from 4.0.0 before 4.1.1; 3.0.0; 5.0.0; 6.0.0
- oracle communications_cloud_native_core_policy: 1.15.0

## Every score

- @huntrdev: CVSS:3.0 7.5 High `CVSS:3.0/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 7.8 High `AV:N/AC:L/Au:N/C:N/I:N/A:C`

## References

- <https://huntr.dev/bounties/5b3cf33b-ede0-4398-9974-800876dfd994> (exploit, issue-tracking, patch, third-party-advisory, web)
- <https://github.com/chalk/ansi-regex/commit/8d1d7cdb586269882c4bdc1b7325d0c58c8f76f9> (patch, third-party-advisory, web)
- <https://www.oracle.com/security-alerts/cpuapr2022.html> (patch, third-party-advisory, web)
- <https://security.netapp.com/advisory/ntap-20221014-0002/> (third-party-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-3807> (advisory)
- <https://github.com/chalk/ansi-regex/issues/38#issuecomment-924086311> (web)
- <https://github.com/chalk/ansi-regex/issues/38#issuecomment-925924774> (web)
- <https://github.com/chalk/ansi-regex/commit/419250fa510bf31b4cc672e76537a64f9332e1f1> (web)
- <https://github.com/chalk/ansi-regex/commit/75a657da7af875b2e2724fd6331bf0a4b23d3c9a> (web)
- <https://github.com/chalk/ansi-regex/commit/c3c0b3f2736b9c01feec0fef33980c43720dcde8> (web)
- <https://app.snyk.io/vuln/SNYK-JS-ANSIREGEX-1583908> (web)
- <https://github.com/chalk/ansi-regex> (package)
- <https://github.com/chalk/ansi-regex/releases/tag/v6.0.1> (web)
- <https://security.netapp.com/advisory/ntap-20221014-0002> (web)

## Sources

- CVE List: [CVE-2021-3807](https://www.cve.org/CVERecord?id=CVE-2021-3807), CVE Terms of Use, modified 2026-10-08
- GitHub Advisory Database: [GHSA-93q8-gq69-wqmw](https://github.com/advisories/GHSA-93q8-gq69-wqmw), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2021-3807](https://nvd.nist.gov/vuln/detail/CVE-2021-3807), Public domain, modified 2026-10-08

---

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