CVE-2021-23424
JavaScript vulnerability analysis and mitigation

Overview

CVE-2021-23424 affects all versions of the ansi-html package prior to version 0.0.9. The vulnerability was discovered by Ben Caller from Doyensec and disclosed on May 26, 2021. This is a Regular Expression Denial of Service (ReDoS) vulnerability that impacts the package's text processing functionality (Snyk JS, GitHub Issue).

Technical details

The vulnerability exists in a regular expression pattern '\033[(\d+)m' used for processing ANSI text. The pattern contains a catastrophic backtracking issue due to the (\d+) part, which can cause exponential processing time when given malicious input. The complexity increases exponentially - adding one character to the malicious input approximately doubles the processing time (GitHub Issue, Snyk JS). The vulnerability has a CVSS v3.1 base score of 7.5 (High) with vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (Snyk JS).

Impact

When exploited, this vulnerability can cause a complete denial of service by making the application unresponsive. For example, processing a string with 35 repeated characters could cause significant CPU consumption, while a string with 53 repeated characters could take over a year to process (GitHub Issue, Snyk JS).

Mitigation and workarounds

The recommended mitigation is to upgrade ansi-html to version 0.0.9 or higher, which contains the fix. The fix involves removing the asterisk from the problematic regular expression (Snyk JS).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66456CRITICAL9.1
  • JavaScriptJavaScript
  • elysia
NoYesDec 09, 2025
CVE-2025-66457HIGH7.5
  • JavaScriptJavaScript
  • elysia
NoYesDec 09, 2025
CVE-2025-65849MEDIUM6.9
  • JavaScriptJavaScript
  • altcha
NoNoDec 08, 2025
CVE-2025-66202MEDIUM6.5
  • JavaScriptJavaScript
  • astro
NoYesDec 09, 2025
CVE-2025-14284MEDIUM5.1
  • JavaScriptJavaScript
  • @tiptap/extension-link
NoYesDec 09, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management