CVE-2022-21681
JavaScript vulnerability analysis and mitigation

Overview

Marked, a markdown parser and compiler, was found to contain a vulnerability (CVE-2022-21681) prior to version 4.0.10. The vulnerability involves the regular expression inline.reflinkSearch which could cause catastrophic backtracking against certain strings, potentially leading to a denial of service (DoS). The issue was discovered and disclosed on January 14, 2022, affecting all versions of Marked before 4.0.10 (GitHub Advisory).

Technical details

The vulnerability stems from the inline.reflinkSearch regular expression implementation that can trigger catastrophic backtracking when processing certain input strings. The issue has been assigned a CVSS v3.1 base score of 7.5 (High), with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. The vulnerability is classified under CWE-1333 (Inefficient Regular Expression Complexity) and CWE-400 (Uncontrolled Resource Consumption) (NVD).

Impact

When exploited, this vulnerability can lead to a denial of service condition by causing the application to consume excessive CPU resources while processing specially crafted markdown input. The impact is particularly significant for systems that process untrusted markdown content without proper resource limitations (GitHub Advisory).

Mitigation and workarounds

The primary mitigation is to upgrade to Marked version 4.0.10 or later, which contains the fix for this vulnerability. For systems that cannot immediately upgrade, recommended workarounds include avoiding processing untrusted markdown content or running Marked on a worker thread with a reasonable time limit to prevent resource exhaustion (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-2026-22610HIGH8.5
  • JavaScriptJavaScript
  • angular.js
NoYesJan 10, 2026
CVE-2026-22595HIGH8.1
  • JavaScriptJavaScript
  • ghost
NoYesJan 10, 2026
CVE-2026-22594HIGH8.1
  • JavaScriptJavaScript
  • ghost
NoYesJan 10, 2026
CVE-2026-22596MEDIUM6.7
  • JavaScriptJavaScript
  • ghost
NoYesJan 10, 2026
CVE-2026-22597LOW2
  • JavaScriptJavaScript
  • ghost
NoYesJan 10, 2026

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