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-41311

CVE-2026-41311: Liquidjs Template Engine DOS Vulnerability

CVE-2026-41311 is a denial of service flaw in Liquidjs template engine caused by circular block references that crash Node.js. This article covers the technical details, affected versions, impact, and mitigation.

Published: May 18, 2026

CVE-2026-41311 Overview

CVE-2026-41311 is a denial-of-service vulnerability in LiquidJS, a Shopify and GitHub Pages compatible template engine written in pure JavaScript. Versions prior to 10.25.7 permit a circular block reference between {% layout %} and {% block %} tags. This circular reference triggers an infinite recursive loop during template rendering. The loop consumes approximately 4GB of memory before crashing the Node.js process with FATAL ERROR: JavaScript heap out of memory. Any user able to submit a Liquid template can trigger the condition, making multi-tenant rendering environments particularly exposed. The maintainers patched the issue in version 10.25.7.

Critical Impact

Authenticated attackers who can submit Liquid templates can crash the Node.js process by exhausting heap memory, producing a reliable denial-of-service condition.

Affected Products

  • LiquidJS versions prior to 10.25.7
  • Node.js applications embedding LiquidJS for server-side template rendering
  • Multi-tenant platforms accepting user-submitted Liquid templates

Discovery Timeline

  • 2026-05-09 - CVE-2026-41311 published to NVD
  • 2026-05-14 - Last updated in NVD database

Technical Details for CVE-2026-41311

Vulnerability Analysis

The vulnerability is an uncontrolled recursion flaw classified under [CWE-674]. LiquidJS supports template inheritance through the {% layout %} tag, which loads a parent layout, and the {% block %} tag, which defines or overrides named regions. When a layout references a block that in turn references the layout, the template engine enters an unbounded recursive expansion. Each recursion frame allocates additional template state on the Node.js heap. The process terminates with FATAL ERROR: JavaScript heap out of memory after the V8 heap limit is reached, typically around 4GB.

Root Cause

The template engine did not track block resolution context per render invocation. The internal getRegister helper returned a shared mutable object without scoping it to the current layout traversal. Circular references between layout and block therefore re-entered the same resolution path indefinitely without a termination check.

Attack Vector

Exploitation requires the attacker to supply a Liquid template that is rendered by the server. The CVSS vector indicates network reach with low privileges required and no user interaction. Confidentiality and integrity are unaffected, but availability is fully compromised when the Node.js worker crashes.

typescript
// Patch excerpt: src/context/context.ts
// Source: https://github.com/harttle/liquidjs/commit/e2311dfd6e82f73509308aa8a3a1fafc92e226f0
    this.memoryLimit = memoryLimit ?? new Limiter('memory alloc', renderOptions.memoryLimit ?? opts.memoryLimit)
    this.renderLimit = renderLimit ?? new Limiter('template render', getPerformance().now() + (renderOptions.renderLimit ?? opts.renderLimit))
  }
-  public getRegister (key: string) {
-    return (this.registers[key] = this.registers[key] || {})
+  public getRegister<T> (key: string, defaultValue: T = undefined as T): T {
+    return (this.registers[key] = this.registers[key] || defaultValue)
  }
  public setRegister (key: string, value: any) {
    return (this.registers[key] = value)

The patch generalizes getRegister to accept a typed default value, enabling callers in the layout and block tag implementations to track per-render state and break circular references. See the LiquidJS commit e2311df for the full fix.

Detection Methods for CVE-2026-41311

Indicators of Compromise

  • Node.js process crashes with the log line FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
  • Sudden resident memory growth toward the V8 heap ceiling (default near 4GB) immediately preceding a worker exit
  • Repeated 502 or 504 responses from services that render user-supplied Liquid templates

Detection Strategies

  • Inspect submitted Liquid templates for {% layout %} directives that reference a parent which redefines or re-extends the calling template through {% block %}
  • Correlate template render error logs with the originating tenant, API key, or user account to identify abusive submitters
  • Track LiquidJS version metadata in software bills of materials and flag any version below 10.25.7

Monitoring Recommendations

  • Alert on Node.js worker restarts and out-of-memory exit codes from process managers such as PM2, systemd, or Kubernetes
  • Monitor heap utilization with --max-old-space-size instrumentation and set thresholds well below the configured limit
  • Log template render durations and trigger alerts when individual renders exceed expected latency budgets

How to Mitigate CVE-2026-41311

Immediate Actions Required

  • Upgrade LiquidJS to version 10.25.7 or later across all Node.js services
  • Audit dependency trees with npm ls liquidjs or yarn why liquidjs to identify transitive consumers
  • Restrict template submission to trusted users until patching is complete

Patch Information

The fix is available in LiquidJS v10.25.7 via commit e2311df. Refer to GitHub Security Advisory GHSA-4rc3-7j7w-m548 for the maintainer's disclosure.

Workarounds

  • Configure renderLimit and memoryLimit options on the LiquidJS Liquid constructor to bound per-render resources
  • Reject templates that contain both {% layout %} and overriding {% block %} tags pointing back to the caller using static analysis before rendering
  • Run template rendering in isolated worker processes so that an out-of-memory crash does not affect the primary service
bash
# Upgrade LiquidJS to the patched release
npm install liquidjs@^10.25.7

# Verify the installed version
npm ls liquidjs

# Run Node.js workers with a constrained heap and supervised restarts
node --max-old-space-size=512 server.js

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechLiquidjs

  • SeverityMEDIUM

  • CVSS Score6.5

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-674
  • Technical References
  • GitHub Release v10.25.7
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory GHSA-4rc3-7j7w-m548
  • Related CVEs
  • CVE-2026-34166: LiquidJS Memory Limit Bypass DoS Vulnerability

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

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

  • CVE-2026-39412: LiquidJS Information Disclosure Flaw
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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