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
    • 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-2026-24001

CVE-2026-24001: jsdiff Library DoS Vulnerability

CVE-2026-24001 is a denial-of-service vulnerability in the jsdiff JavaScript library that causes infinite loops when parsing malformed patches. This article covers technical details, affected versions, impact, and mitigation.

Published: January 23, 2026

CVE-2026-24001 Overview

CVE-2026-24001 is a Denial of Service vulnerability in jsdiff, a popular JavaScript text differencing implementation. The vulnerability allows attackers to trigger an infinite loop in the parsePatch method by crafting malicious patch files containing specific line break characters (\r, \\u2028, or \\u2029) in filename headers. This leads to unbounded memory consumption until the process crashes.

Critical Impact

Applications using jsdiff to parse user-provided patches are vulnerable to denial-of-service attacks. The vulnerability requires no large payload to exploit, making input size limits ineffective as protection.

Affected Products

  • jsdiff versions prior to 8.0.3
  • jsdiff versions prior to 5.2.2
  • jsdiff versions prior to 4.0.4

Discovery Timeline

  • 2026-01-22 - CVE CVE-2026-24001 published to NVD
  • 2026-01-22 - Last updated in NVD database

Technical Details for CVE-2026-24001

Vulnerability Analysis

The vulnerability exists in the parsePatch function within jsdiff's patch parsing module. When processing patch files, the function's regular expression for parsing file headers (--- and +++ lines) fails to properly handle certain Unicode line break characters. Specifically, the presence of carriage return (\r), line separator (\\u2028), or paragraph separator (\\u2029) characters in filename headers causes the parsing logic to enter an infinite loop.

A secondary, related vulnerability manifests as a Regular Expression Denial of Service (ReDoS) when these same characters appear in the patch header (also known as "leading garbage"). In this case, a maliciously-crafted patch header of length n can cause parsePatch to take O(n³) time to process, enabling algorithmic complexity attacks.

The applyPatch method is also affected when called with a string representation of a patch, as it internally uses parsePatch to process the input.

Root Cause

The root cause is improper input validation in the file header parsing regular expression. The original regex pattern (/^(---|\\+\\+\\+)\\s+(.*)\\r?$/) attempted to handle carriage returns but failed to account for Unicode line terminators. This allowed specially crafted input to bypass the expected parsing flow, causing the parser to loop indefinitely without advancing through the input.

Attack Vector

The attack is network-based and requires no authentication or user interaction. An attacker can exploit this vulnerability by:

  1. Providing a maliciously crafted patch file to any application that uses jsdiff's parsePatch or applyPatch methods
  2. Injecting malicious characters into filenames if the application allows user control over filenames used in diff operations
  3. Submitting crafted patches through web interfaces, APIs, or any input mechanism that feeds into jsdiff
typescript
// Security patch in src/patch/parse.ts
// Source: https://github.com/kpdecker/jsdiff/commit/15a1585230748c8ae6f8274c202e0c87309142f5

   // Parses the --- and +++ headers, if none are found, no lines
   // are consumed.
   function parseFileHeader(index: Partial<StructuredPatch>) {
-    const fileHeader = (/^(---|\\+\\+\\+)\\s+(.*)\\r?$/).exec(diffstr[i]);
-    if (fileHeader) {
-      const data = fileHeader[2].split('\\t', 2),
+    const fileHeaderMatch = (/^(---|\\+\\+\\+)\\s+/).exec(diffstr[i]);
+    if (fileHeaderMatch) {
+      const prefix = fileHeaderMatch[1],
+            data = diffstr[i].substring(3).trim().split('\\t', 2),
             header = (data[1] || '').trim();
       let fileName = data[0].replace(/\\\\/g, '\\');
-      if ((/^".*"$/).test(fileName)) {
+      if (fileName.startsWith('"') && fileName.endsWith('"')) {
         fileName = fileName.substr(1, fileName.length - 2);
       }
-      if (fileHeader[1] === '---') {
+      if (prefix === '---') {
         index.oldFileName = fileName;
         index.oldHeader = header;
       } else {

Detection Methods for CVE-2026-24001

Indicators of Compromise

  • Abnormal memory consumption in Node.js or JavaScript runtime processes handling patch operations
  • Application crashes or out-of-memory errors in services that process user-submitted patches
  • Unusual CPU spikes during patch parsing operations
  • Process hangs without visible network or I/O activity when handling diff operations

Detection Strategies

  • Monitor memory usage patterns in applications that utilize jsdiff for patch processing
  • Implement logging around parsePatch and applyPatch calls to detect processing delays exceeding normal thresholds
  • Use application performance monitoring (APM) tools to detect infinite loop patterns characterized by CPU usage without progress
  • Audit dependency manifests for vulnerable jsdiff versions using npm audit or similar tools

Monitoring Recommendations

  • Set up alerts for memory threshold breaches in services using jsdiff
  • Implement request timeout monitoring for endpoints that process patch data
  • Deploy resource quotas and circuit breakers for patch processing services
  • Monitor for repeated crashes or restarts of affected services

How to Mitigate CVE-2026-24001

Immediate Actions Required

  • Update jsdiff to version 8.0.3, 5.2.2, or 4.0.4 depending on your major version branch
  • Audit applications to identify all code paths that call parsePatch or applyPatch with user-controlled input
  • Implement input sanitization to reject patches containing \r, \\u2028, or \\u2029 characters before passing to jsdiff
  • Deploy resource limits (memory caps, timeouts) around patch processing operations

Patch Information

The vulnerability has been fixed in jsdiff versions 8.0.3, 5.2.2, and 4.0.4. The fix modifies the file header parsing logic to avoid the problematic regular expression pattern and properly handle line termination. For detailed information, see the GitHub Security Advisory, GitHub Pull Request #649, and the commit containing the fix.

Workarounds

  • Filter input patches to remove or reject any containing carriage return (\r), line separator (\\u2028), or paragraph separator (\\u2029) characters
  • Implement a pre-validation function that scans patch content before processing
  • Run jsdiff operations in isolated worker threads with strict memory and time limits
  • Consider using a web worker or separate process with resource constraints for untrusted patch parsing
bash
# Configuration example
# Pre-validate patch files before processing with jsdiff
# This regex check can be implemented before calling parsePatch

# In Node.js, sanitize input before parsing:
# if (/[\r\\u2028\\u2029]/.test(patchString)) {
#   throw new Error('Invalid characters in patch file');
# }

# Update jsdiff to patched version
npm update diff@8.0.3
# or for older major versions:
npm update diff@5.2.2
npm update diff@4.0.4

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechJsdiff

  • SeverityLOW

  • CVSS Score2.7

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-400
  • Technical References
  • GitHub Commit Update

  • GitHub Issue Discussion

  • GitHub Pull Request

  • GitHub Security Advisory GHSA-73rr-hh4g-fpgx
  • Latest CVEs
  • CVE-2025-70797: LimeSurvey XSS Vulnerability

  • CVE-2025-30650: Juniper Junos OS Auth Bypass Vulnerability

  • CVE-2026-35471: Goshs Path Traversal Vulnerability

  • CVE-2026-35393: Goshs Path Traversal 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