CVE-2022-21680
JavaScript vulnerability analysis and mitigation

Overview

The vulnerability (CVE-2022-21680) was discovered in the marked library, affecting versions prior to 4.0.10. The issue involves a regular expression pattern in block.def that may cause catastrophic backtracking against certain strings, leading to a regular expression denial of service (ReDoS) vulnerability. The vulnerability was disclosed on January 14, 2022 (GitHub Advisory).

Technical details

The vulnerability exists in the regular expression pattern block.def within the marked library. When processing certain input strings, the pattern can trigger catastrophic backtracking, causing excessive CPU usage. A proof of concept demonstrates this by using repeated spaces: [x]:${' '.repeat(1500)}x ${' '.repeat(1500)} x (GitHub Advisory). The vulnerability has been assigned a CVSS v3 base score of 7.5 (High), with attack vector: Network, attack complexity: Low, privileges required: None, user interaction: None, scope: Unchanged, and availability impact: High (GitHub Advisory).

Impact

The vulnerability can lead to denial of service conditions when processing untrusted markdown through the marked library. When exploited, it can cause excessive CPU usage, potentially affecting the availability of the system processing the markdown content (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in version 4.0.10 of the marked library. Users are advised to upgrade to this version or later. As a workaround, users can either avoid running untrusted markdown through marked or run marked on a worker thread with a reasonable time limit to prevent resource drainage (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-23744CRITICAL9.8
  • JavaScriptJavaScript
  • @mcpjam/inspector
NoYesJan 16, 2026
CVE-2026-23735HIGH8.7
  • JavaScriptJavaScript
  • graphql-modules
NoYesJan 16, 2026
GHSA-gw32-9rmw-qwwwHIGH8.4
  • JavaScriptJavaScript
  • svelte
NoYesJan 16, 2026
CVE-2026-23745HIGH8.2
  • JavaScriptJavaScript
  • nodejs-full-i18n
NoYesJan 16, 2026
GHSA-38cw-85xc-xr9xMEDIUM6.8
  • JavaScriptJavaScript
  • @veramo/data-store
NoYesJan 16, 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