Vulnerability · Published Sep 17, 2021 · Assigned by @huntrdev

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

High 7.5

In plain English

A high-severity regular-expression denial of service in chalk/ansi-regex from chalk. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 3.6% (higher than 89% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.0)7.5High
Exploit odds (30 days)3.6%top 10.6% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

ansi-regex is vulnerable to Inefficient Regular Expression Complexity

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8nodejs1:16.13.1-3.module_el8.5.0+2605+45d748afALSA-2021:5171
AlmaLinux:8nodejs1:14.18.2-2.module_el8.5.0+254+b4526b16ALSA-2022:0350
AlmaLinux:8nodejs1:14.18.2-2.module_el8.5.0+2618+8d46dafdALSA-2022:0350
AlmaLinux:8nodejs1:16.13.1-3.module_el8.5.0+246+05401605ALSA-2021:5171
AlmaLinux:9nodejs1:16.16.0-1.el9_0ALSA-2022:6595
AlmaLinux:8nodejs-devel1:14.18.2-2.module_el8.5.0+2618+8d46dafdALSA-2022:0350
AlmaLinux:8nodejs-devel1:16.13.1-3.module_el8.5.0+246+05401605ALSA-2021:5171
AlmaLinux:8nodejs-devel1:14.18.2-2.module_el8.5.0+254+b4526b16ALSA-2022:0350
AlmaLinux:8nodejs-devel1:16.13.1-3.module_el8.5.0+2605+45d748afALSA-2021:5171
AlmaLinux:8nodejs-docs1:16.13.1-3.module_el8.5.0+246+05401605ALSA-2021:5171
AlmaLinux:8nodejs-docs1:14.18.2-2.module_el8.5.0+254+b4526b16ALSA-2022:0350
AlmaLinux:8nodejs-docs1:14.18.2-2.module_el8.5.0+2618+8d46dafdALSA-2022:0350
AlmaLinux:8nodejs-docs1:16.13.1-3.module_el8.5.0+2605+45d748afALSA-2021:5171
AlmaLinux:9nodejs-docs1:16.16.0-1.el9_0ALSA-2022:6595
AlmaLinux:8nodejs-full-i18n1:14.18.2-2.module_el8.5.0+2618+8d46dafdALSA-2022:0350
AlmaLinux:8nodejs-full-i18n1:14.18.2-2.module_el8.5.0+254+b4526b16ALSA-2022:0350
AlmaLinux:8nodejs-full-i18n1:16.13.1-3.module_el8.5.0+2605+45d748afALSA-2021:5171
AlmaLinux:8nodejs-full-i18n1:16.13.1-3.module_el8.5.0+246+05401605ALSA-2021:5171
AlmaLinux:9nodejs-full-i18n1:16.16.0-1.el9_0ALSA-2022:6595
AlmaLinux:9nodejs-libs1:16.16.0-1.el9_0ALSA-2022:6595
AlmaLinux:8nodejs-nodemon2.0.15-1.module_el8.5.0+2618+8d46dafdALSA-2022:0350
AlmaLinux:8nodejs-nodemon2.0.15-1.module_el8.6.0+2904+f21ad6f4ALSA-2021:5171
AlmaLinux:8nodejs-nodemon2.0.15-1.module_el8.5.0+2605+45d748afALSA-2021:5171
AlmaLinux:8nodejs-nodemon2.0.15-1.module_el8.6.0+2904+f21ad6f4ALSA-2022:0350
AlmaLinux:8nodejs-nodemon2.0.15-1.module_el8.5.0+2605+45d748afALSA-2022:0350
AlmaLinux:9nodejs-nodemon2.0.19-1.el9_0ALSA-2022:6595
AlmaLinux:8nodejs-packaging23-3.module_el8.5.0+2618+8d46dafdALSA-2022:0350
AlmaLinux:8nodejs-packaging25-1.module_el8.5.0+2605+45d748afALSA-2021:5171
AlmaLinux:8nodejs-packaging25-1.module_el8.5.0+246+05401605ALSA-2021:5171
AlmaLinux:8nodejs-packaging23-3.module_el8.4.0+2522+3bd42762ALSA-2022:0350
AlmaLinux:8npm1:8.1.2-1.16.13.1.3.module_el8.5.0+246+05401605ALSA-2021:5171
AlmaLinux:8npm1:6.14.15-1.14.18.2.2.module_el8.5.0+254+b4526b16ALSA-2022:0350
AlmaLinux:8npm1:6.14.15-1.14.18.2.2.module_el8.5.0+2618+8d46dafdALSA-2022:0350
AlmaLinux:8npm1:8.1.2-1.16.13.1.3.module_el8.5.0+2605+45d748afALSA-2021:5171
AlmaLinux:9npm1:8.11.0-1.16.16.0.1.el9_0ALSA-2022:6595
Debian:12node-ansi-regex5.0.1-1DEBIAN-CVE-2021-3807
Debian:13node-ansi-regex5.0.1-1DEBIAN-CVE-2021-3807
Debian:14node-ansi-regex5.0.1-1DEBIAN-CVE-2021-3807
Rocky Linux:8nodejs1:16.13.1-3.module+el8.5.0+721+4c107270RLSA-2021:5171
Rocky Linux:8nodejs1:16.16.0-3.module+el8.6.0+1003+ae94235aRLSA-2022:6449
Rocky Linux:8nodejs1:14.18.2-2.module+el8.5.0+733+de4fee6cRLSA-2022:0350
Rocky Linux:8nodejs-nodemon0:2.0.19-2.module+el8.6.0+1046+80feca58RLSA-2022:6449
Rocky Linux:8nodejs-nodemon0:2.0.15-1.module+el8.5.0+721+4c107270RLSA-2021:5171
Rocky Linux:8nodejs-nodemon0:2.0.15-1.module+el8.5.0+721+4c107270RLSA-2022:0350
Rocky Linux:8nodejs-nodemon0:2.0.19-2.module+el8.6.0+1003+ae94235aRLSA-2022:6449
Rocky Linux:9nodejs-nodemon0:2.0.19-1.el9_0RLSA-2022:6595
Rocky Linux:8nodejs-packaging0:23-3.module+el8.5.0+733+de4fee6cRLSA-2022:0350
Rocky Linux:8nodejs-packaging0:25-1.module+el8.6.0+1046+80feca58RLSA-2021:5171
Rocky Linux:8nodejs-packaging0:25-1.module+el8.5.0+702+221f14e6RLSA-2021:5171
Rocky Linux:8nodejs-packaging0:23-3.module+el8.7.0+1071+4bdda2a8RLSA-2022:0350
Rocky Linux:8nodejs-packaging0:23-3.module+el8.3.0+100+234774f7RLSA-2022:0350
Rocky Linux:8nodejs-packaging0:25-1.module+el8.6.0+1046+80feca58RLSA-2022:6449
Rocky Linux:8nodejs-packaging0:25-1.module+el8.5.0+702+221f14e6RLSA-2022:6449
Ubuntu:22.04:LTSnode-ansi-regexno fix listedUBUNTU-CVE-2021-3807
Ubuntu:24.04:LTSnode-ansi-regexno fix listedUBUNTU-CVE-2021-3807
Ubuntu:25.10node-ansi-regexno fix listedUBUNTU-CVE-2021-3807
Ubuntu:26.04:LTSnode-ansi-regexno fix listedUBUNTU-CVE-2021-3807
Ubuntu:26.10node-ansi-regexno fix listedUBUNTU-CVE-2021-3807
npmansi-regex6.0.1GHSA-93q8-gq69-wqmw
npmansi-regex5.0.1GHSA-93q8-gq69-wqmw
npmansi-regex4.1.1GHSA-93q8-gq69-wqmw
npmansi-regex3.0.1GHSA-93q8-gq69-wqmw

Affected products (as reported)

VendorProductVersions
chalk chalk/ansi-regex unspecified – before 6.0.1unspecified – before 5.0.1

Weakness: CWE-1333 · Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References