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

Published Sep 17, 2021
·
Updated

A regular expression denial of service (ReDoS) vulnerability was found in nodejs-ansi-regex. This could possibly cause an application using ansi-regex to use an excessive amount of CPU time when matching crafted ANSI escape codes.

Other sources

ansi-regex is vulnerable to Inefficient Regular Expression Complexity

Affected Software

18 affected componentsFixes available
npm/ansi-regex>=3.0.0<3.0.1
3.0.1
npm/ansi-regex>=4.0.0<4.1.1
4.1.1
npm/ansi-regex>=5.0.0<5.0.1
5.0.1
npm/ansi-regex>=6.0.0<6.0.1
6.0.1
redhat/nodejs-nodemon<0:2.0.19-1.el9_0
0:2.0.19-1.el9_0
redhat/rh-nodejs14-nodejs<0:14.18.2-1.el7
0:14.18.2-1.el7
redhat/rh-nodejs14-nodejs-nodemon<0:2.0.3-6.el7
0:2.0.3-6.el7
redhat/ovirt-engine-ui-extensions<0:1.3.3-1.el8e
0:1.3.3-1.el8e
redhat/ovirt-web-ui<0:1.9.0-1.el8e
0:1.9.0-1.el8e
Ansi-regex Project Ansi-regex Node.js>=4.0.0<4.1.1
Ansi-regex Project Ansi-regex Node.js=3.0.0
Ansi-regex Project Ansi-regex Node.js=5.0.0
Ansi-regex Project Ansi-regex Node.js=6.0.0
Oracle Communications Cloud Native Core Policy=1.15.0
redhat/nodejs-ansi-regex<6.0.1
6.0.1
redhat/nodejs-ansi-regex<5.0.1
5.0.1
IBM Cognos Analytics<=11.2.0 - 11.2.2
IBM Cognos Analytics<=11.1.0 - 11.1.6 FP4

Event History

Sep 17, 2021
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionSeverityWeakness
Sep 20, 2021
Advisory Published
08:20 PM
Sep 24, 2021
Data Sourced
via Red Hat·09:17 AM
DescriptionSeverityAffected Software
Feb 23, 2026
Data Sourced
via IBM·11:32 PM
DescriptionAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2021-3807?

CVE-2021-3807 is a vulnerability in ansi-regex that allows for inefficient regular expression complexity, leading to a denial of service when parsing invalid ANSI escape codes.

2

How severe is the vulnerability CVE-2021-3807?

The severity of CVE-2021-3807 is high, with a CVSS score of 7.5.

3

Which software is affected by CVE-2021-3807?

The affected software includes ansi-regex versions 3.0.0 to 3.0.1, 4.0.0 to 4.1.1, 5.0.0 to 5.0.1, and 6.0.0 to 6.0.1, as well as other packages and products mentioned in the vulnerability description.

4

How can I fix the vulnerability CVE-2021-3807?

To fix the vulnerability, upgrade ansi-regex to version 3.0.1, 4.1.1, 5.0.1, or 6.0.1, depending on your current version. Make sure to also update any other affected packages or products mentioned in the vulnerability description.

5

Where can I find more information about CVE-2021-3807?

You can find more information about CVE-2021-3807 on the NIST National Vulnerability Database (NVD) website and the GitHub page for chalk/ansi-regex.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203