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-2023-24807

CVE-2023-24807: Node.js Undici ReDoS Vulnerability

CVE-2023-24807 is a Regular Expression Denial of Service flaw in Node.js Undici HTTP/1.1 client affecting Headers methods. This article covers the technical details, affected versions, security impact, and mitigation.

Published: February 4, 2026

CVE-2023-24807 Overview

CVE-2023-24807 is a Regular Expression Denial of Service (ReDoS) vulnerability affecting the Undici HTTP/1.1 client for Node.js. Prior to version 5.19.1, the Headers.set() and Headers.append() methods are vulnerable to ReDoS attacks when untrusted values are passed into these functions. This vulnerability stems from an inefficient regular expression used to normalize header values in the headerValueNormalize() utility function, which can be exploited by attackers to cause excessive CPU consumption and application unavailability.

Critical Impact

Attackers can exploit this vulnerability remotely without authentication to cause denial of service conditions in Node.js applications using the Undici HTTP client by supplying specially crafted header values that trigger catastrophic backtracking in the regex engine.

Affected Products

  • nodejs undici versions prior to 5.19.1
  • Node.js applications utilizing the Undici HTTP client library
  • Applications accepting untrusted input for HTTP header values

Discovery Timeline

  • 2023-02-16 - CVE-2023-24807 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2023-24807

Vulnerability Analysis

The vulnerability exists in the headerValueNormalize() function within lib/fetch/headers.js. This function is responsible for normalizing HTTP header values by removing leading and trailing HTTP whitespace bytes (carriage return, newline, tab, and space characters). The original implementation used a single regular expression /^[\r\n\t ]+|[\r\n\t ]+$/g with the replace() method to trim whitespace from both ends of the input string.

The problematic pattern, particularly the trailing whitespace portion [\r\n\t ]+$, is susceptible to catastrophic backtracking when processing specially crafted input strings. When an attacker provides a header value containing a long sequence of whitespace-like characters followed by non-matching content, the regex engine may enter an exponential backtracking state, consuming excessive CPU cycles and blocking the event loop.

Root Cause

The root cause is the use of an inefficient regular expression for string trimming operations. The regex [\r\n\t ]+$ matches one or more whitespace characters at the end of a string. When applied to input with specific patterns, the regex engine attempts numerous backtracking combinations before determining a non-match, leading to algorithmic complexity attacks. This is a classic example of CWE-1333 (Inefficient Regular Expression Complexity) combined with CWE-20 (Improper Input Validation).

Attack Vector

An attacker can exploit this vulnerability by providing maliciously crafted header values through the Headers.set() or Headers.append() methods. The attack requires network access to the affected application but does not require authentication or user interaction. Applications that accept HTTP header values from untrusted sources (such as proxied requests, user-controlled inputs, or external API responses) are particularly at risk. A successful attack results in CPU exhaustion, causing the Node.js application to become unresponsive.

javascript
   //  To normalize a byte sequence potentialValue, remove
   //  any leading and trailing HTTP whitespace bytes from
   //  potentialValue.
-  return potentialValue.replace(
-    /^[\r\n\t ]+|[\r\n\t ]+$/g,
-    ''
-  )
+
+  // Trimming the end with `.replace()` and a RegExp is typically subject to
+  // ReDoS. This is safer and faster.
+  let i = potentialValue.length
+  while (/[\r\n\t ]/.test(potentialValue.charAt(--i)));
+  return potentialValue.slice(0, i + 1).replace(/^[\r\n\t ]+/, '')
}

function fill (headers, object) {

Source: GitHub Commit f2324e5

The patch replaces the problematic regex-based trimming with a safer approach: it uses a simple character-by-character loop to find the last non-whitespace character, then slices the string and only applies regex to trim the leading whitespace, which is less prone to backtracking issues.

Detection Methods for CVE-2023-24807

Indicators of Compromise

  • Abnormally high CPU utilization in Node.js processes without corresponding increase in legitimate traffic
  • Event loop lag or delays in processing incoming HTTP requests
  • Application timeouts or unresponsiveness when handling specific HTTP headers
  • Error logs indicating request timeouts or worker thread exhaustion

Detection Strategies

  • Monitor Node.js process CPU consumption and alert on sustained high utilization patterns
  • Implement request timeout monitoring to detect slow processing indicative of ReDoS attacks
  • Use dependency scanning tools (npm audit, Snyk, OWASP Dependency-Check) to identify vulnerable Undici versions
  • Deploy application performance monitoring (APM) to track event loop latency and identify blocking operations

Monitoring Recommendations

  • Enable detailed logging for HTTP header processing in applications using Undici
  • Set up alerts for event loop delays exceeding normal thresholds (e.g., >100ms)
  • Monitor memory and CPU metrics at the container/process level for anomalous patterns
  • Implement rate limiting on endpoints that process untrusted header values

How to Mitigate CVE-2023-24807

Immediate Actions Required

  • Upgrade Undici to version 5.19.1 or later immediately
  • Audit applications to identify all instances where Undici's Headers.set() or Headers.append() methods receive untrusted input
  • Implement input validation and length limits on HTTP header values before passing to Undici
  • Consider deploying a web application firewall (WAF) to filter malicious header patterns as a defense-in-depth measure

Patch Information

The vulnerability was patched in Undici version 5.19.1. The fix replaces the vulnerable regex-based whitespace trimming with a more efficient algorithm that uses character iteration to find trailing whitespace, avoiding the exponential backtracking behavior. Organizations should update their package.json dependencies and run npm update undici or yarn upgrade undici to apply the fix. For detailed patch information, refer to the GitHub Security Advisory and the release notes for v5.19.1.

Workarounds

  • No official workarounds are available according to the vendor advisory
  • As a temporary measure, implement strict input validation on header values before processing
  • Set maximum length constraints on HTTP header values to reduce attack surface
  • Deploy request timeout mechanisms to terminate slow requests that may indicate ReDoS exploitation
bash
# Upgrade Undici to patched version
npm update undici@5.19.1

# Verify installed version
npm list undici

# Audit for vulnerabilities
npm audit

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechNodejs

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.27%

  • 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-20

  • CWE-1333
  • Technical References
  • GitHub Release v5.19.1

  • HackerOne Bug Report

  • NetApp Security Advisory
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-21712: Node.js URL Processing DoS Vulnerability

  • CVE-2026-21710: Node.js HTTP DOS Vulnerability

  • CVE-2026-21714: Node.js HTTP/2 Memory Leak DoS Vulnerability

  • CVE-2026-1526: Undici WebSocket Client DoS 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