CVE-2021-3807 Inefficient Regular Expression Complexity in chalk/ansi-regex
An attacker can cause a denial of service by triggering inefficient regular expression complexity in the ansi-regex library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-3807?
CVE-2021-3807 is a high-severity denial of service vulnerability in Oracle Communications Cloud Native Core Policy, published on 17 Sep 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
ansi-regex is vulnerable to Inefficient Regular Expression Complexity
Weakness: CWE-1333
Which versions are affected by CVE-2021-3807?
8 open source packages ship an affected version, including ansi-regex. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
ansi-regex npm | From 3.0.0 | 3.0.1 |
ansi-regex npm | From 3.0.0 | 3.0.1 |
ansi-regex npm | From 4.0.0 | 4.1.1 |
ansi-regex npm | From 4.0.0 | 4.1.1 |
ansi-regex npm | From 5.0.0 | 5.0.1 |
ansi-regex npm | From 5.0.0 | 5.0.1 |
2 more packages
ansi-regex npm | From 6.0.0 | 6.0.1 |
ansi-regex npm | From 6.0.0 | 6.0.1 |
Products include Ansi-Regex Project Ansi-Regex, Oracle Communications Cloud Native Core Policy.
How do I fix CVE-2021-3807?
Upgrade ansi-regex to a fixed version for your release line: 3.0.1, 4.1.1, 5.0.1 or 6.0.1.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2021-3807 being exploited?
There is no known exploitation of CVE-2021-3807 in the wild and no public exploit code.
Sources
Also known as CLSA-2026-1782089817, DEBIAN-CVE-2021-3807, GHSA-93q8-gq69-wqmw, MINI-8hxm-8fpc-x8c9, ROOT-APP-NPM-CVE-2021-3807, UBUNTU-CVE-2021-3807.