---
id: CVE-2021-3807
title: ansi-regex is vulnerable to Inefficient Regular Expression Complexity
summary: ansi-regex is vulnerable to Inefficient Regular Expression Complexity
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'
cwe:
  - CWE-1333
  - CWE-1333
vendor: ansi-regex_project
product: ansi-regex
affected:
  - 'ansi-regex >= 4.0.0, < 4.1.1'
  - ansi-regex = 3.0.0
  - ansi-regex = 5.0.0
  - ansi-regex = 6.0.0
  - communications_cloud_native_core_policy = 1.15.0
patched:
  - ansi-regex 4.1.1
published: '2021-09-17'
updated: '2026-10-08'
sourceUpdated: '2026-10-08T22:17:11.557'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2021-3807'
references:
  - url: >-
      https://github.com/chalk/ansi-regex/commit/8d1d7cdb586269882c4bdc1b7325d0c58c8f76f9
    label: security@huntr.dev
  - url: 'https://huntr.dev/bounties/5b3cf33b-ede0-4398-9974-800876dfd994'
    label: security@huntr.dev
  - url: 'https://security.netapp.com/advisory/ntap-20221014-0002/'
    label: security@huntr.dev
  - url: 'https://www.oracle.com/security-alerts/cpuapr2022.html'
    label: security@huntr.dev
  - url: >-
      https://github.com/chalk/ansi-regex/commit/8d1d7cdb586269882c4bdc1b7325d0c58c8f76f9
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://huntr.dev/bounties/5b3cf33b-ede0-4398-9974-800876dfd994'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://security.netapp.com/advisory/ntap-20221014-0002/'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://www.oracle.com/security-alerts/cpuapr2022.html'
    label: af854a3a-2127-422b-91ae-364da2661108
tags:
  - nvd
epss: 0.03552
epssPercentile: 0.88994
ingestedAt: '2026-10-08T23:16:47.323Z'
---

## Overview

ansi-regex is vulnerable to Inefficient Regular Expression Complexity

## Affected

- `ansi-regex >= 4.0.0, < 4.1.1`
- `ansi-regex = 3.0.0`
- `ansi-regex = 5.0.0`
- `ansi-regex = 6.0.0`
- `communications_cloud_native_core_policy = 1.15.0`

## Remediation

Upgrade past the affected range:

- `ansi-regex 4.1.1`
