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-2021-23343

CVE-2021-23343: Path-parse ReDoS Vulnerability

CVE-2021-23343 is a Regular Expression Denial of Service flaw in path-parse affecting all versions. Attackers can exploit regex patterns to cause performance degradation. This article covers technical details, impact, and mitigation.

Published: February 25, 2026

CVE-2021-23343 Overview

CVE-2021-23343 is a Regular Expression Denial of Service (ReDoS) vulnerability affecting all versions of the path-parse npm package. The vulnerability exists in the splitDeviceRe, splitTailRe, and splitPathRe regular expressions used for parsing file paths. When processing maliciously crafted input strings, these regular expressions exhibit polynomial worst-case time complexity, allowing attackers to cause significant CPU resource exhaustion and application hangs.

Critical Impact

Attackers can exploit this vulnerability to cause denial of service conditions in Node.js applications by sending specially crafted path strings that trigger catastrophic backtracking in the vulnerable regular expressions, potentially rendering the application unresponsive.

Affected Products

  • path-parse (all versions) for Node.js
  • Applications using path-parse as a dependency
  • WebJars npm packages containing path-parse (SNYK-JAVA-ORGWEBJARSNPM-1279028)

Discovery Timeline

  • 2021-05-04 - CVE-2021-23343 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-23343

Vulnerability Analysis

The path-parse package provides functionality to parse file paths into their constituent components (root, dir, base, ext, name). The vulnerability stems from inefficient regular expression patterns used internally for parsing operations. When these regular expressions process input strings containing certain character sequences, they enter a state of catastrophic backtracking.

ReDoS vulnerabilities occur when regular expressions can be manipulated to run in exponential or polynomial time rather than linear time. In the case of path-parse, the affected regular expressions (splitDeviceRe, splitTailRe, and splitPathRe) contain overlapping patterns that cause the regex engine to explore an exponentially growing number of possible matches when fed adversarial input.

The network attack vector combined with no required privileges means that any unauthenticated remote attacker can send malicious input to an application using path-parse, potentially causing denial of service. The primary impact is availability degradation, as the CPU becomes tied up processing the malicious regex operations.

Root Cause

The root cause is the use of regular expressions with nested quantifiers and overlapping alternations in the path parsing logic. These pattern constructs are known to be vulnerable to ReDoS attacks because they create ambiguous matching scenarios where the regex engine must backtrack extensively to determine the correct match.

The vulnerable regular expressions contain constructs that, when given carefully crafted input strings, force the JavaScript regex engine into a polynomial-time matching operation. This is a classic example of algorithmic complexity attack where the computational cost grows polynomially with input length.

Attack Vector

An attacker can exploit this vulnerability by sending a specially crafted path string to any application function that processes paths using the vulnerable path-parse package. The attack requires no authentication and can be conducted remotely over the network. Common attack scenarios include:

  • Submitting malicious file paths through file upload forms
  • Sending crafted path strings via API endpoints that process file paths
  • Injecting malicious paths through URL parameters or query strings
  • Any user-controlled input that eventually gets processed by path-parse

The attack causes the application's event loop to block while the regex engine attempts to process the malicious input, effectively causing a denial of service condition.

Detection Methods for CVE-2021-23343

Indicators of Compromise

  • Unusual CPU spikes in Node.js application processes
  • Application response time degradation when processing path-related operations
  • Event loop blocking or application hangs during file path parsing
  • Increased memory usage patterns correlated with path parsing functions

Detection Strategies

  • Monitor Node.js application performance metrics for CPU exhaustion patterns
  • Implement request timeout mechanisms to detect and terminate long-running path operations
  • Use application performance monitoring (APM) tools to track regex execution time
  • Review application logs for patterns indicating slow path parsing operations
  • Scan dependencies using npm audit or tools like Snyk to identify vulnerable path-parse versions

Monitoring Recommendations

  • Set up alerts for abnormal CPU utilization in Node.js processes
  • Implement request-level timeouts to prevent indefinite blocking
  • Monitor event loop lag metrics to detect potential ReDoS exploitation
  • Track and alert on unusual patterns in path-related API endpoints
  • Enable detailed logging for path parsing operations in production environments

How to Mitigate CVE-2021-23343

Immediate Actions Required

  • Audit your application dependencies for path-parse usage with npm ls path-parse
  • Update to the latest patched version of path-parse if available
  • Implement input validation to limit path string length before processing
  • Apply request timeouts to prevent long-running operations from blocking the application
  • Consider using Node.js built-in path module as an alternative where possible

Patch Information

The vulnerability affects all versions of path-parse. Organizations should check the GitHub Issue Discussion for the latest patch status and updates from the maintainer. Security advisories are available through Snyk JS Vulnerability Database and Snyk Java Vulnerability Database for WebJars users.

Workarounds

  • Implement strict input length validation for any user-controlled path strings before passing to path-parse
  • Use request timeout middleware to automatically terminate requests that exceed reasonable processing time
  • Consider replacing path-parse with Node.js native path.parse() function which is not affected
  • Implement rate limiting on endpoints that process file paths to reduce attack surface
  • Deploy Web Application Firewall (WAF) rules to detect and block suspiciously long path strings
bash
# Check for vulnerable path-parse in your project
npm ls path-parse

# Audit dependencies for known vulnerabilities
npm audit

# Update to latest version if patch is available
npm update path-parse

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechPath Parse

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.35%

  • 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
  • NVD-CWE-noinfo
  • Technical References
  • GitHub Issue Discussion

  • Apache MyFaces Mailing List

  • Snyk Java Vulnerability

  • Snyk JS Vulnerability
  • Latest CVEs
  • CVE-2025-52479: HTTP.jl & URIs.jl CRLF Injection Flaw

  • CVE-2026-31740: Linux Kernel Race Condition Vulnerability

  • CVE-2026-31743: Linux Kernel Buffer Overflow Vulnerability

  • CVE-2026-31744: Linux Kernel NULL Pointer 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