Home / chalk / chalk/ansi-regex / CVE-2021-3807
CVE-2021-3807: is it exploited, and which versions of chalk/ansi-regex are affected and fixed?
CVE-2021-3807 is a regular expression denial of service (ReDoS) vulnerability in chalk/ansi-regex. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 19:09 UTC). Affected: ansi-regex from 6.0.0 before 6.0.1, ansi-regex from 5.0.0 before 5.0.1, ansi-regex from 4.0.0 before 4.1.1 and 1 more (GitHub advisory GHSA-93q8-gq69-wqmw). Fixed in 6.0.1, 5.0.1, 4.1.1 and 3.0.1 (GitHub advisory GHSA-93q8-gq69-wqmw). Severity: High (7.5, CVSS 3.0, from @huntrdev).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 19:09 UTC, CVE record November 28, 2026, 20:21 UTC and NVD November 19, 2026, 07:55 UTC.
What is CVE-2021-3807?
Inefficient Regular Expression Complexity in chalk/ansi-regex
ansi-regex is vulnerable to Inefficient Regular Expression Complexity
From the CVE record by @huntrdev, last updated October 8, 2026, 21:14 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| chalk | chalk/ansi-regex | before 6.0.1 before 5.0.1 | 6.0.1, 5.0.1 |
As the CVE record by @huntrdev states it, last updated October 8, 2026. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| npm | ansi-regex | >= 6.0.0, < 6.0.1 | 6.0.1 | GHSA-93q8-gq69-wqmw |
| npm | ansi-regex | >= 5.0.0, < 5.0.1 | 5.0.1 | GHSA-93q8-gq69-wqmw |
| npm | ansi-regex | >= 4.0.0, < 4.1.1 | 4.1.1 | GHSA-93q8-gq69-wqmw |
| npm | ansi-regex | >= 3.0.0, < 3.0.1 | 3.0.1 | GHSA-93q8-gq69-wqmw |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated September 11, 2023. Summary: Inefficient Regular Expression Complexity in chalk/ansi-regex.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| ansi-regex project | ansi-regex | from 4.0.0 before 4.1.1 | application |
| ansi-regex project | ansi-regex | 3.0.0 | application |
| ansi-regex project | ansi-regex | 5.0.0 | application |
| ansi-regex project | ansi-regex | 6.0.0 | application |
| oracle | communications cloud native core policy | 1.15.0 | application |
NVD analysis (status Modified), last modified October 8, 2026, 22:17 UTC.
How severe is CVE-2021-3807?
| Score | Version | Vector | Source |
|---|---|---|---|
| High 7.5 | CVSS 3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | @huntrdev |
| High 7.5 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NVD |
| High 7.8 | CVSS 2.0 | AV:N/AC:L/Au:N/C:N/I:N/A:C | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2021-3807 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: none; automatable: yes; technical impact: partial (CISA ADP, October 8, 2026)
- EPSS
- 3.55% probability of exploitation activity in the next 30 days, percentile 89.7 (FIRST EPSS, scores of December 3, 2026)
What kind of flaw is it?
Where are the vendor advisories and references?
- https://huntr.dev/bounties/5b3cf33b-ede0-4398-9974-800876dfd994
- https://github.com/chalk/ansi-regex/commit/8d1d7cdb586269882c4bdc1b7325d0c58c8f76f9
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://security.netapp.com/advisory/ntap-20221014-0002/
When was it published, and where is the official record?
- Reserved
- September 16, 2021
- Published
- September 17, 2021, 00:00 UTC
- CVE record updated
- October 8, 2026, 21:14 UTC by @huntrdev
- NVD
- Modified, last modified October 8, 2026, 22:17 UTC
- Last checked
- CVE list November 28, 2026, 20:21 UTC; NVD November 19, 2026, 07:55 UTC; KEV December 3, 2026, 19:09 UTC; EPSS December 3, 2026
- Official record
- cve.org · NVD
Questions about CVE-2021-3807
Is CVE-2021-3807 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 19:09 UTC. FIRST's EPSS gives it a 3.55% chance of exploitation activity in the next 30 days (scores of December 3, 2026).
Which versions of chalk/ansi-regex are affected by CVE-2021-3807?
ansi-regex from 6.0.0 before 6.0.1, ansi-regex from 5.0.0 before 5.0.1, ansi-regex from 4.0.0 before 4.1.1 and ansi-regex from 3.0.0 before 3.0.1, per the GitHub advisory GHSA-93q8-gq69-wqmw. The tables above give every range the sources list.
Which version fixes CVE-2021-3807?
6.0.1, 5.0.1, 4.1.1 and 3.0.1, per the GitHub advisory GHSA-93q8-gq69-wqmw. Check the vendor's advisory before you rely on it.
How severe is CVE-2021-3807?
High (7.5, CVSS 3.0, from @huntrdev). The severity table above shows each score with its source.
Where is the official record of CVE-2021-3807?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.