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-2026-34166

CVE-2026-34166: LiquidJS Memory Limit Bypass DoS Vulnerability

CVE-2026-34166 is a denial of service flaw in LiquidJS that allows attackers to bypass memory limits via the replace filter with 2,500x amplification. This article covers technical details, affected versions, and patches.

Published: April 10, 2026

CVE-2026-34166 Overview

CVE-2026-34166 is a Resource Exhaustion vulnerability in LiquidJS, a Shopify and GitHub Pages compatible template engine written in pure JavaScript. Prior to version 10.25.3, the replace filter incorrectly accounts for memory usage when the memoryLimit option is enabled, allowing attackers who control template content to bypass DoS protections and potentially cause out-of-memory conditions.

Critical Impact

Attackers controlling template content can bypass memory limit protections with approximately 2,500x amplification, potentially causing denial of service through memory exhaustion.

Affected Products

  • LiquidJS versions prior to 10.25.3
  • Applications using LiquidJS with memoryLimit option enabled
  • Shopify/GitHub Pages compatible implementations using vulnerable LiquidJS versions

Discovery Timeline

  • April 8, 2026 - CVE-2026-34166 published to NVD
  • April 8, 2026 - Last updated in NVD database

Technical Details for CVE-2026-34166

Vulnerability Analysis

The vulnerability exists in the replace filter implementation within LiquidJS. The filter incorrectly calculates memory consumption by charging only str.length + pattern.length + replacement.length bytes to the memory limiter. However, the actual output generated by str.split(pattern).join(replacement) can be quadratically larger when the pattern occurs many times within the input string.

This miscalculation creates a significant amplification opportunity. When an attacker crafts a template with a string containing many occurrences of a short pattern and specifies a longer replacement string, the resulting output consumes far more memory than what was charged to the limiter. The research indicates this can result in approximately 2,500x memory amplification, effectively bypassing the memoryLimit DoS protection mechanism entirely.

Root Cause

The root cause is an improper memory accounting calculation in the string replace filter (CWE-400: Uncontrolled Resource Consumption). The original implementation failed to account for the multiplicative effect of pattern occurrences when calculating the output size. Instead of computing the actual output size based on the number of pattern matches and the difference between replacement and pattern lengths, it used a simplified linear calculation that drastically underestimated memory usage.

Attack Vector

This vulnerability is exploitable over the network by attackers who can control template content processed by LiquidJS. The attack requires crafting a malicious template that uses the replace filter with:

  1. An input string containing many repeated occurrences of a short pattern
  2. A replacement string significantly longer than the pattern
  3. The combination results in output that exceeds the intended memory limit while staying within the incorrectly calculated budget

The following patch addresses the vulnerability by correctly calculating the output size:

typescript
   const str = stringify(v)
   pattern = stringify(pattern)
   replacement = stringify(replacement)
-  this.context.memoryLimit.use(str.length + pattern.length + replacement.length)
-  return str.split(pattern).join(replacement)
+  const parts = str.split(pattern)
+  const outputSize = str.length + (parts.length - 1) * (replacement.length - pattern.length)
+  this.context.memoryLimit.use(outputSize)
+  return parts.join(replacement)
 }
 
 export function replace_first (this: FilterImpl, v: string, arg1: string, arg2: string) {

Source: GitHub Commit

Detection Methods for CVE-2026-34166

Indicators of Compromise

  • Unusual memory consumption spikes in Node.js applications using LiquidJS
  • Out-of-memory errors or application crashes during template rendering
  • Template inputs containing strings with highly repetitive patterns combined with replace filter usage
  • Process terminations due to memory limits being exceeded at the OS or container level

Detection Strategies

  • Monitor memory usage patterns in applications processing user-controlled templates
  • Implement application-level logging for template rendering operations that exceed normal memory thresholds
  • Audit template inputs for suspicious patterns involving repetitive strings with replace filters
  • Use runtime memory profiling to identify abnormal allocation patterns during template processing

Monitoring Recommendations

  • Set up alerting for memory usage anomalies in LiquidJS-powered applications
  • Implement request-level memory tracking for template rendering endpoints
  • Monitor for repeated out-of-memory conditions that may indicate exploitation attempts
  • Track template complexity metrics to identify potentially malicious inputs

How to Mitigate CVE-2026-34166

Immediate Actions Required

  • Upgrade LiquidJS to version 10.25.3 or later immediately
  • Review application logs for signs of memory exhaustion attacks
  • Implement additional application-level memory limits as a defense-in-depth measure
  • Restrict or sanitize user-controlled template content where possible

Patch Information

The vulnerability is fixed in LiquidJS version 10.25.3. The fix correctly calculates the output size by computing the actual memory that will be consumed based on the number of pattern occurrences and the size difference between the replacement and pattern strings. The patch is available via the GitHub Release v10.25.3 and detailed in the GitHub Security Advisory GHSA-mmg9-6m6j-jqqx.

Workarounds

  • Implement strict input validation on template content before processing
  • Deploy additional process-level memory limits using container orchestration or OS-level controls
  • Disable user-controlled templates if not strictly required by business logic
  • Consider implementing template complexity analysis to reject potentially malicious inputs
bash
# Update LiquidJS to the patched version
npm update liquidjs@10.25.3

# Or install specifically
npm install liquidjs@^10.25.3

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechLiquidjs

  • SeverityLOW

  • CVSS Score3.7

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-400
  • Technical References
  • GitHub Commit Message

  • GitHub Release v10.25.3

  • GitHub Security Advisory GHSA-mmg9-6m6j-jqqx
  • Related CVEs
  • CVE-2026-33287: LiquidJS Template Engine DoS Vulnerability

  • CVE-2026-33285: LiquidJS Template Engine DoS Vulnerability

  • CVE-2026-39412: LiquidJS Information Disclosure Flaw

  • CVE-2026-39859: LiquidJS 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