cve.bz

CVE-2021-3807

7.5 highExploit referenceEPSS 3.6%Fix available

High (7.5). EPSS 3.6% estimated probability of exploitation activity in the next 30 days. Fixed in ansi-regex 3.0.1, 4.1.1, 5.0.1.

On this page
ansi-regex is vulnerable to Inefficient Regular Expression Complexity

Severity

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
EPSS
3.6% (unchanged from 3.6% a week ago; 3.6% 30 days ago) estimated probability of exploitation activity in the next 30 days; 89th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: partial, assessed 2026-10-08. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-1333 Inefficient Regular Expression Complexity
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-3807 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-3807?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-3807?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-3807 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2021-3807

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2021-3807](https://cve.bz/cve/badge/CVE-2021-3807.svg)](https://cve.bz/cve/CVE-2021-3807)

HTML:

<a href="https://cve.bz/cve/CVE-2021-3807"><img src="https://cve.bz/cve/badge/CVE-2021-3807.svg" alt="CVE-2021-3807"></a>

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
chalk/ansi-regexbefore 6.0.1
chalk/ansi-regexbefore 5.0.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-93q8-gq69-wqmwnpmansi-regex>=6.0.0 <6.0.16.0.1
GHSA-93q8-gq69-wqmwnpmansi-regex>=5.0.0 <5.0.15.0.1
GHSA-93q8-gq69-wqmwnpmansi-regex>=4.0.0 <4.1.14.1.1
GHSA-93q8-gq69-wqmwnpmansi-regex>=3.0.0 <3.0.13.0.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14node-ansi-regex5.0.1-1DEBIAN-CVE-2021-3807
Ubuntu18.04:LTS, 20.04:LTS, 22.04:LTS and 4 morenode-ansi-regexno fix listedUBUNTU-CVE-2021-3807
Red Hatenterprise_linux:8::appstreamnodejs, nodejs-docs, nodejs-devel and 3 more1:14.18.2-2.module+el8.5.0+13644+8d46dafdRHSA-2022:0350
Red Hatenterprise_linux:8::appstreamnodejs, nodejs-docs, nodejs-devel and 3 more1:16.13.1-3.module+el8.5.0+13548+45d748afRHSA-2021:5171
Red Hatenterprise_linux:8::appstreamnodejs, nodejs-docs, nodejs-devel and 3 more1:16.16.0-3.module+el8.6.0+16248+76b0e185RHSA-2022:6449
Red Hatenterprise_linux:8::appstreamnodejs-nodemon0:2.0.15-1.module+el8.5.0+13504+a2e74d91RHSA-2022:0350
Red Hatenterprise_linux:8::appstreamnodejs-nodemon0:2.0.15-1.module+el8.5.0+13548+45d748afRHSA-2021:5171
Red Hatenterprise_linux:8::appstreamnodejs-nodemon0:2.0.19-2.module+el8.6.0+16240+7ca51420RHSA-2022:6449
Red Hatenterprise_linux:8::appstreamnodejs-packaging0:23-3.module+el8.3.0+6519+9f98ed83RHSA-2022:0350
Red Hatenterprise_linux:8::appstreamnodejs-packaging0:25-1.module+el8.5.0+10992+fac5fe06RHSA-2021:5171 RHSA-2022:6449
Red Hatenterprise_linux:8::appstreamnpm1:6.14.15-1.14.18.2.2.module+el8.5.0+13644+8d46dafdRHSA-2022:0350
Red Hatenterprise_linux:8::appstreamnpm1:8.1.2-1.16.13.1.3.module+el8.5.0+13548+45d748afRHSA-2021:5171
Red Hatenterprise_linux:8::appstreamnpm1:8.11.0-1.16.16.0.3.module+el8.6.0+16248+76b0e185RHSA-2022:6449
Red Hatenterprise_linux:9::appstreamnodejs, nodejs-docs, nodejs-libs and 4 more1:16.16.0-1.el9_0RHSA-2022:6595
15 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 6, Enterprise Storage 7, Linux Enterprise High Performance Computing 15 SP1-ESPOS and 16 morenodejs-common2.0-3.4.1SUSE-SU-2022:0704-1
SUSEEnterprise Storage 6, Enterprise Storage 7, Linux Enterprise High Performance Computing 15 SP1-ESPOS and 16 morenodejs1010.24.1-150000.1.44.1SUSE-SU-2022:1717-1
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 7 morenodejs88.17.0-3.54.2SUSE-SU-2022:0563-1
SUSEEnterprise Storage 7, Linux Enterprise High Performance Computing 15 SP1-LTSS, Linux Enterprise High Performance Computing 15 SP2-LTSS and 5 morebind9.16.6-150000.12.65.1SUSE-SU-2023:2578-1
SUSEEnterprise Storage 7, Linux Enterprise High Performance Computing 15 SP2-ESPOS, Linux Enterprise High Performance Computing 15 SP2-LTSS and 7 morenodejs1212.22.10-4.29.3SUSE-SU-2022:0657-1
SUSEEnterprise Storage 7, Linux Enterprise High Performance Computing 15 SP2-ESPOS, Linux Enterprise High Performance Computing 15 SP2-LTSS and 7 morenodejs1414.19.0-15.27.1SUSE-SU-2022:0715-1
SUSEEnterprise Storage 7, Linux Enterprise High Performance Computing 15 SP2-ESPOS, Linux Enterprise High Performance Computing 15 SP2-LTSS and 6 morenodejs88.17.0-10.19.2SUSE-SU-2022:0704-1
SUSELinux Enterprise Module for Package Hub 15 SP4, Linux Enterprise Module for Package Hub 15 SP5grafana9.5.1-150200.3.41.3SUSE-SU-2023:2575-1
SUSELinux Enterprise Module for Package Hub 15 SP5grafana9.5.8-150200.3.53.2SUSE-RU-2024:0511-1
SUSELinux Enterprise Module for Web and Scripting 12nodejs1010.24.1-1.46.1SUSE-SU-2022:0570-1
SUSELinux Enterprise Module for Web and Scripting 12nodejs1212.22.10-1.42.2SUSE-SU-2022:0531-1
SUSELinux Enterprise Module for Web and Scripting 12nodejs1414.19.0-6.24.1SUSE-SU-2022:0569-1
65 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.3nodejs1212.22.10-4.29.3openSUSE-SU-2022:0657-1
openSUSELeap 15.3nodejs1414.19.0-15.27.1openSUSE-SU-2022:0715-1
openSUSELeap 15.3nodejs88.17.0-10.19.2openSUSE-SU-2022:0704-1
openSUSELeap 15.3, Leap 15.4nodejs1010.24.1-150000.1.44.1SUSE-SU-2022:1717-1
openSUSELeap 15.4bind9.16.6-150000.12.65.1SUSE-SU-2023:2578-1
openSUSELeap 15.4, Leap 15.5dracut-saltboot0.1.1681904360.84ef141-150000.1.50.1SUSE-SU-2023:2578-1
openSUSELeap 15.4, Leap 15.5grafana9.5.1-150200.3.41.3SUSE-SU-2023:2575-1
openSUSELeap 15.4, Leap 15.5spacecmd4.3.21-150000.3.98.1SUSE-SU-2023:2578-1
openSUSELeap 15.4, Leap 15.5wire0.5.0-150000.1.12.3SUSE-SU-2023:2578-1
openSUSELeap 15.5golang-github-lusitaniae-apache_exporter1.0.0-150000.1.20.1SUSE-SU-2024:0487-1
openSUSELeap 15.5grafana9.5.8-150200.3.53.2SUSE-RU-2024:0511-1
openSUSELeap 15.5prometheus-postgres_exporter0.10.1-150000.1.17.1SUSE-SU-2024:0487-1
2 more for openSUSE in the JSON and on openSUSE's page.
AlmaLinux8nodejs, nodejs-docs, nodejs-devel and 1 more1:14.18.2-2.module_el8.5.0+254+b4526b16ALSA-2022:0350
AlmaLinux8nodejs, nodejs-docs, nodejs-devel and 1 more1:14.18.2-2.module_el8.5.0+2618+8d46dafdALSA-2022:0350
AlmaLinux8nodejs, nodejs-docs, nodejs-devel and 1 more1:16.13.1-3.module_el8.5.0+246+05401605ALSA-2021:5171
AlmaLinux8nodejs, nodejs-docs, nodejs-devel and 1 more1:16.13.1-3.module_el8.5.0+2605+45d748afALSA-2021:5171
AlmaLinux8nodejs-nodemon2.0.15-1.module_el8.5.0+2605+45d748afALSA-2021:5171 ALSA-2022:0350
AlmaLinux8nodejs-nodemon2.0.15-1.module_el8.5.0+2618+8d46dafdALSA-2022:0350
AlmaLinux8nodejs-nodemon2.0.15-1.module_el8.6.0+2904+f21ad6f4ALSA-2021:5171 ALSA-2022:0350
AlmaLinux8nodejs-packaging23-3.module_el8.4.0+2522+3bd42762ALSA-2022:0350
AlmaLinux8nodejs-packaging23-3.module_el8.5.0+2618+8d46dafdALSA-2022:0350
AlmaLinux8nodejs-packaging25-1.module_el8.5.0+246+05401605ALSA-2021:5171
AlmaLinux8nodejs-packaging25-1.module_el8.5.0+2605+45d748afALSA-2021:5171
AlmaLinux8npm1:6.14.15-1.14.18.2.2.module_el8.5.0+254+b4526b16ALSA-2022:0350
6 more for AlmaLinux in the JSON.
Rocky Linux8nodejs1:14.18.2-2.module+el8.5.0+733+de4fee6cRLSA-2022:0350
Rocky Linux8nodejs1:16.13.1-3.module+el8.5.0+721+4c107270RLSA-2021:5171
Rocky Linux8nodejs1:16.16.0-3.module+el8.6.0+1003+ae94235aRLSA-2022:6449
Rocky Linux8nodejs-nodemon0:2.0.15-1.module+el8.5.0+721+4c107270RLSA-2021:5171 RLSA-2022:0350
Rocky Linux8nodejs-nodemon0:2.0.19-2.module+el8.6.0+1003+ae94235aRLSA-2022:6449
Rocky Linux8nodejs-nodemon0:2.0.19-2.module+el8.6.0+1046+80feca58RLSA-2022:6449
Rocky Linux8nodejs-packaging0:23-3.module+el8.3.0+100+234774f7RLSA-2022:0350
Rocky Linux8nodejs-packaging0:23-3.module+el8.5.0+733+de4fee6cRLSA-2022:0350
Rocky Linux8nodejs-packaging0:23-3.module+el8.7.0+1071+4bdda2a8RLSA-2022:0350
Rocky Linux8nodejs-packaging0:25-1.module+el8.5.0+702+221f14e6RLSA-2021:5171 RLSA-2022:6449
Rocky Linux8nodejs-packaging0:25-1.module+el8.6.0+1046+80feca58RLSA-2021:5171 RLSA-2022:6449
Rocky Linux9nodejs-nodemon0:2.0.19-1.el9_0RLSA-2022:6595

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This flaw requires crafted invalid ANSI escape codes in order to be exploited and only allows for denial of service of applications on the client side, hence the impact has been rated as Moderate.

In Red Hat Virtualization and Red Hat Quay some components use a vulnerable version of ansi-regex. However, all frontend code is executed on the client side. As the maximum impact of this vulnerability is denial of service in the client, the vulnerability is rated Moderate for those products.

OpenShift Container Platform 4 (OCP) ships affected version of ansi-regex in the ose-metering-hadoop container, however the metering operator is deprecated since 4.6[1]. This issue is not currently planned to be addressed in future updates and hence hadoop container has been marked as 'will not fix'.

Advanced Cluster Management for Kubernetes (RHACM) ships the affected version of ansi-regex in several containers, however the impact of this vulnerability is deemed low as it would result in an authenticated slowing down their own user interface.

[1] https://docs.openshift.com/container-platform/4.6/metering/metering-about-metering.html

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8nodejs:16-8050020211206113934.c5368500Fixed 2021-12-16RHSA-2021:5171
Red Hat Enterprise Linux 8nodejs:14-8050020211213115342.c5368500Fixed 2022-02-01RHSA-2022:0350
Red Hat Enterprise Linux 8nodejs:16-8060020220805104227.ad008a3aFixed 2022-09-13RHSA-2022:6449
Red Hat Enterprise Linux 8.4 Extended Update Supportnodejs:14-8040020211213111158.522a0ee4Fixed 2022-01-25RHSA-2022:0246
Red Hat Enterprise Linux 9nodejs-nodemon-0:2.0.19-1.el9_0Fixed 2022-09-20RHSA-2022:6595
Red Hat Fuse 7.11io.hawt-hawtio-onlineFixed 2022-07-07RHSA-2022:5532
Red Hat Fuse 7.11io.hawt-projectFixed 2022-07-07RHSA-2022:5532
Red Hat Migration Toolkit for Containers 1.6rhmtc/openshift-migration-ui-rhel8:v1.6.5-8Fixed 2022-05-31RHSA-2022:4814
Red Hat Migration Toolkit for Containers 1.7rhmtc/openshift-migration-ui-rhel8:v1.7.2-9Fixed 2022-07-01RHSA-2022:5483
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-nodejs14-nodejs-0:14.18.2-1.el7Fixed 2022-01-06RHSA-2022:0041
Migration Toolkit for Virtualizationmigration-toolkit-virtualization/mtv-ui-rhel8Fix deferred
OpenShift Service Mesh 1kialiOut of support scope
OpenShift Service Mesh 1servicemesh-grafanaOut of support scope
OpenShift Service Mesh 1servicemesh-prometheusOut of support scope
OpenShift Service Mesh 2.0servicemesh-grafanaAffected
OpenShift Service Mesh 2.0servicemesh-prometheusAffected
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/application-ui-rhel8Affected
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/console-api-rhel8Affected
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/console-header-rhel8Fix deferred
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/console-rhel8Affected
63 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-3807.

Attack patterns (CAPEC)

  • CAPEC-492 Regular Expression Exponential Blowup

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON