The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2022-21680

CVE-2022-21680: Marked Markdown Parser ReDoS Vulnerability

CVE-2022-21680 is a regular expression denial of service flaw in Marked markdown parser caused by catastrophic backtracking. This article covers the technical details, affected versions, impact, and mitigation strategies.

Published: February 18, 2026

CVE-2022-21680 Overview

CVE-2022-21680 is a Regular Expression Denial of Service (ReDoS) vulnerability affecting Marked, a popular markdown parser and compiler for Node.js. Prior to version 4.0.10, the regular expression block.def may cause catastrophic backtracking against certain input strings, leading to a denial of service condition. Applications that process untrusted markdown input through vulnerable versions of Marked without implementing worker thread timeouts are at risk of resource exhaustion attacks.

Critical Impact

Attackers can craft malicious markdown input that triggers catastrophic regex backtracking, causing the application to become unresponsive and potentially exhausting server resources.

Affected Products

  • Marked versions prior to 4.0.10 (Node.js package)
  • Fedora 36 (via packaged marked component)
  • Any application using vulnerable Marked versions to parse untrusted markdown

Discovery Timeline

  • 2022-01-14 - CVE-2022-21680 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2022-21680

Vulnerability Analysis

This vulnerability is classified under CWE-400 (Uncontrolled Resource Consumption) and CWE-1333 (Inefficient Regular Expression Complexity). The vulnerable regular expression in the block.def pattern contains constructs that allow for exponential backtracking when processing specially crafted input strings.

Regular Expression Denial of Service (ReDoS) attacks exploit the non-deterministic nature of regex engines. When a regex contains nested quantifiers or overlapping alternations, the engine may need to explore an exponentially growing number of possible matches before determining that no match exists. This results in CPU-bound operations that can lock up processing threads indefinitely.

Root Cause

The root cause lies in the block.def regular expression used for parsing markdown definition references. The original pattern contained inefficient groupings with optional whitespace handling that created multiple possible matching paths. Specifically, the pattern *\\n? * allowed the regex engine to backtrack extensively when encountering malformed or adversarial input, as there were multiple ways to match or skip the newline and space characters.

Attack Vector

The attack is network-based and requires no authentication or user interaction. An attacker can exploit this vulnerability by submitting crafted markdown content to any endpoint or service that processes it through the vulnerable Marked library. The attack is particularly effective against:

  • Web applications with markdown preview functionality
  • Content management systems accepting markdown input
  • API endpoints processing markdown documentation
  • Chat applications with markdown rendering
javascript
// Security patch in src/rules.js
// Source: https://github.com/markedjs/marked/commit/c4a3ccd344b6929afa8a1d50ac54a721e57012c0

     + '|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)' // (7) open tag
     + '|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)' // (7) closing tag
     + ')',
-  def: /^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,
+  def: /^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,
   table: noopTest,
   lheading: /^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,
   // regex template, placeholders will be replaced according to different paragraph

The patch modifies the regex to use non-capturing groups with more precise patterns, reducing the number of backtracking paths available to the regex engine.

Detection Methods for CVE-2022-21680

Indicators of Compromise

  • Abnormally high CPU utilization on servers processing markdown content
  • Application threads becoming unresponsive during markdown parsing operations
  • Increased response times or timeouts on endpoints accepting markdown input
  • Memory consumption spikes associated with regex processing
  • Error logs showing timeout exceptions in markdown parsing functions

Detection Strategies

  • Monitor Node.js application CPU usage patterns for sustained spikes during content processing
  • Implement application performance monitoring (APM) to track markdown parsing latency
  • Use dependency scanning tools to identify vulnerable marked package versions in package.json or package-lock.json
  • Deploy runtime protection that can detect and terminate runaway regex operations
  • Set up alerting for requests with unusually long processing times to markdown endpoints

Monitoring Recommendations

  • Configure SentinelOne Singularity to monitor for resource exhaustion patterns in Node.js processes
  • Implement request timeout monitoring on all endpoints that accept markdown input
  • Track the ratio of markdown input size to processing time to detect anomalous patterns
  • Monitor for repeated requests from single sources targeting markdown processing endpoints
  • Review application logs for patterns of failed or timed-out markdown parsing operations

How to Mitigate CVE-2022-21680

Immediate Actions Required

  • Upgrade Marked to version 4.0.10 or later immediately
  • Audit all applications and dependencies for usage of vulnerable Marked versions
  • Implement input size limits on markdown content before processing
  • Run Marked parsing in a worker thread with enforced time limits
  • Consider temporarily disabling markdown processing for untrusted input until patched

Patch Information

The vulnerability is fixed in Marked version 4.0.10. The patch modifies the block.def regular expression in src/rules.js to eliminate the catastrophic backtracking condition. Organizations should update their dependencies using:

bash
npm update marked

For more information, refer to the GitHub Security Advisory GHSA-rrrm-qjm4-v8hf and the GitHub Release v4.0.10.

Workarounds

  • Run Marked parsing in a dedicated worker thread with a strict timeout (e.g., 5 seconds)
  • Implement input sanitization to reject markdown content exceeding reasonable size limits
  • Deploy a web application firewall (WAF) to filter potentially malicious markdown patterns
  • Use rate limiting on endpoints that process markdown to reduce attack surface
bash
# Configuration example for running marked with timeout in Node.js
# Create a worker wrapper with timeout enforcement

# package.json dependency update
npm install marked@^4.0.10 --save

# Verify installed version
npm list marked
# Expected output: marked@4.0.10 or higher

# For environments where immediate upgrade is not possible,
# implement worker thread with timeout:
# - Use worker_threads module
# - Set timeout to 5000ms maximum
# - Terminate worker on timeout to prevent resource exhaustion

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechMarked

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.71%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-400

  • CWE-1333
  • Technical References
  • GitHub Release v4.0.10

  • GitHub Security Advisory GHSA-rrrm-qjm4-v8hf

  • Fedora Package Announcement
  • Vendor Resources
  • GitHub Commit Update
  • Latest CVEs
  • CVE-2025-9185: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9184: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9180: Mozilla Firefox Auth Bypass Vulnerability

  • CVE-2025-8030: Mozilla Firefox RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English