CVE-2022-21670
JavaScript vulnerability analysis and mitigation

Overview

CVE-2022-21670 affects markdown-it, a Markdown parser, in versions prior to 1.3.2. The vulnerability was discovered and disclosed on January 8, 2022. The issue involves special patterns with length greater than 50 thousand characters that could significantly slow down the parser's performance (GitHub Advisory, NVD).

Technical details

The vulnerability is related to a Regular Expression Denial of Service (ReDoS) issue in the newline rule of the parser. The issue occurs when processing special patterns containing whitespace characters exceeding 50,000 characters in length. A proof of concept demonstrates the vulnerability using the pattern x ${' '.repeat(150000)} x \nx which can cause significant parser slowdown (GitHub Advisory).

Impact

When exploited, this vulnerability can lead to a denial of service condition by causing significant slowdown in the parser's performance when processing specially crafted markdown content with large patterns (GitHub Advisory).

Mitigation and workarounds

Users should upgrade to markdown-it version 12.3.2 or later, which contains the fix for this vulnerability. The patch modifies the newline rule implementation to prevent the performance degradation issue. No workarounds are available for users who cannot upgrade (GitHub Advisory).

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