Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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-2025-27789

CVE-2025-27789: Babel Compiler DOS Vulnerability

CVE-2025-27789 is a denial of service flaw in Babel compiler affecting regex named capturing groups with quadratic complexity. This post explains its impact, affected versions, and mitigation steps.

Updated: January 22, 2026

CVE-2025-27789 Overview

CVE-2025-27789 is an algorithmic complexity vulnerability in Babel, a widely-used JavaScript compiler for writing next-generation JavaScript. When using vulnerable versions of Babel to compile regular expression named capturing groups, the compiler generates a polyfill for the .replace method that exhibits quadratic time complexity when processing specific replacement pattern strings. This vulnerability can lead to denial of service conditions when untrusted input is passed to the .replace method.

Critical Impact

Applications compiled with vulnerable Babel versions may experience significant performance degradation or complete denial of service when processing malicious replacement strings through the generated .replace polyfill.

Affected Products

  • Babel versions prior to 7.26.10
  • Babel versions prior to 8.0.0-alpha.17
  • @babel/helpers (all versions before the fix)
  • @babel/runtime (all versions before the fix)
  • @babel/core (indirect dependency)

Discovery Timeline

  • 2025-03-11 - CVE CVE-2025-27789 published to NVD
  • 2025-03-11 - Last updated in NVD database

Technical Details for CVE-2025-27789

Vulnerability Analysis

This vulnerability falls under CWE-1333 (Inefficient Regular Expression Complexity), commonly associated with ReDoS (Regular Expression Denial of Service) attacks. The root issue lies in Babel's polyfill generation for the .replace method when dealing with regular expressions that contain named capturing groups.

When Babel compiles code that uses regular expression named capturing groups combined with the .replace method, it generates polyfill code to ensure backward compatibility with older JavaScript environments. However, this generated polyfill implementation has algorithmic complexity issues that result in quadratic O(n²) time complexity when processing certain replacement pattern strings.

For the vulnerability to be exploitable, three conditions must be met: the application must use Babel to compile regular expression named capturing groups, the compiled code must use the .replace method on a regular expression containing named capturing groups, and the second argument to .replace must accept untrusted user input.

Root Cause

The vulnerability stems from inefficient string processing algorithms in the generated polyfill code for the .replace method. When Babel transpiles modern JavaScript code containing named capturing groups in regular expressions, it creates compatibility code that does not handle replacement pattern strings efficiently, leading to quadratic complexity during string replacement operations.

Attack Vector

The attack vector requires local access where an attacker can supply crafted replacement strings to the vulnerable .replace polyfill. An attacker who can control the second argument passed to .replace on a compiled regular expression with named capturing groups can craft malicious input strings that trigger the quadratic complexity behavior.

The exploitation mechanism involves providing specially crafted replacement pattern strings that cause the inefficient algorithm to perform exponentially more operations, resulting in CPU exhaustion and denial of service. The attack is particularly effective when the replacement string contains specific patterns that maximize the algorithmic inefficiency.

For detailed technical information about the vulnerability mechanism, refer to the GitHub Security Advisory.

Detection Methods for CVE-2025-27789

Indicators of Compromise

  • Abnormal CPU utilization spikes during string replacement operations in JavaScript applications
  • Application hangs or timeouts when processing user-supplied replacement strings
  • Memory consumption increases correlated with string replacement operations
  • Slow response times in endpoints that process user input through regex replace operations

Detection Strategies

  • Audit package.json and package-lock.json files for @babel/helpers, @babel/runtime, or @babel/core versions prior to 7.26.10
  • Use software composition analysis (SCA) tools to identify vulnerable Babel dependencies in build pipelines
  • Monitor application performance metrics for unusual CPU consumption patterns during string processing
  • Review compiled JavaScript output for the presence of vulnerable polyfill code patterns

Monitoring Recommendations

  • Implement application performance monitoring (APM) to detect CPU exhaustion events
  • Set up alerting for response time anomalies in services that process user-supplied strings
  • Monitor build system logs for outdated Babel dependency usage
  • Enable resource usage limits and timeouts for string processing operations

How to Mitigate CVE-2025-27789

Immediate Actions Required

  • Update @babel/helpers and @babel/runtime to version 7.26.10 or 8.0.0-alpha.17 or later
  • Re-compile all JavaScript code after updating Babel dependencies to regenerate polyfills
  • Audit applications for user input paths that reach .replace methods on named capturing group regexes
  • Consider implementing input validation and length limits on replacement strings

Patch Information

The vulnerability has been fixed in @babel/helpers and @babel/runtime versions 7.26.10 and 8.0.0-alpha.17. While upgrading to @babel/core version 7.26.10 is not strictly required, doing so guarantees the use of a patched @babel/helpers version.

Important: Simply updating Babel dependencies is not sufficient to remediate this vulnerability. After updating the packages, all affected code must be re-compiled to regenerate the polyfill code with the fixed implementation.

For patch details, see the GitHub Pull Request #17173.

Workarounds

  • No official workarounds are available according to the vendor advisory
  • As a temporary measure, avoid passing untrusted user input as the second argument to .replace on regexes with named capturing groups
  • Implement input sanitization and length restrictions on replacement strings before they reach vulnerable code paths
  • Consider using alternative string replacement approaches that don't rely on the vulnerable polyfill
bash
# Update Babel dependencies
npm update @babel/helpers @babel/runtime @babel/core

# Verify updated versions
npm list @babel/helpers @babel/runtime @babel/core

# Re-compile all JavaScript code to regenerate polyfills
npm run build

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechBabel

  • SeverityMEDIUM

  • CVSS Score6.2

  • EPSS Probability0.14%

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

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2023-45133: Debian Linux Babel 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