Skip to main content

LiquidJS CVE-2026-41311

| EUVDEUVD-2026-28886 MEDIUM
Uncontrolled Recursion (CWE-674)
2026-04-24 https://github.com/harttle/liquidjs GHSA-4rc3-7j7w-m548
6.5
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Submit malicious template with circular block reference
  2. Delivery
    Template parser accepts nested identical block names
  3. Exploit
    Renderer invokes getBlockRender method
  4. Install
    Inner block lookup finds outer block's render function
  5. C2
    Outer block re-renders templates containing inner block
  6. Execute
    Infinite recursive loop consumes memory
  7. Impact
    Node.js heap grows to ~4GB
  8. Step 8
    Process crashes with OOM error
  9. Step 9
    Complete service unavailability

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
Exploitation Conditions

No special conditions required - remote unauthenticated exploitation against default configurations of LiquidJS. The vulnerability triggers whenever the template engine processes a Liquid template containing nested {% block %} tags with identical block names within a {% layout %} context. Specifically requires: (1) Application accepts user-provided or user-influenced Liquid template markup, (2) Template uses the {% layout %} and {% block %} features for inheritance, (3) A block name is reused within its own scope (e.g., {% block a %}{% block a %}{% endblock %}{% endblock %}). No non-default configuration, authentication beyond template submission capability, or specific Node.js version needed. Affects any deployment where untrusted actors can control template content, including multi-tenant SaaS, CMS with theme uploads, form builders, email campaign tools, and documentation generators. The attack succeeds regardless of template complexity - even minimal two-line templates trigger the infinite loop. Limiting factor: attacker must have a mechanism to submit or inject Liquid templates into the rendering pipeline, but this is the core use case for affected applications.

Impact

Real-world risk is CRITICAL for internet-facing applications processing user templates despite the 7.5 CVSS score. The attack vector is network-based (AV:N), requires no authentication (PR:N), has low complexity (AC:L), and needs no user interaction (UI:N), making exploitation trivial for any attacker who can submit template content. The ~4GB memory consumption and process crash cause complete service disruption (A:H) but no data breach (C:N, I:N). While EPSS and KEV data are not provided, the combination of zero prerequisites, publicly available proof-of-concept in the GitHub advisory, and vendor-confirmed patch indicates imminent exploitation risk. Attack is fully automatable via scripted template submission. SSVC technical impact: total (complete DoS). Primary risk factors: (1) extremely low barrier to exploitation, (2) common deployment pattern (user-generated content in templates), (3) immediate process termination without graceful degradation, (4) public POC with exact reproduction steps. Organizations using LiquidJS in multi-tenant environments or accepting external template input face IMMEDIATE risk. The narrow scope (S:U) limits impact to the vulnerable component itself, but for template-processing services, this IS the critical path.

Exploit ScenarioDerived

An attacker targets a SaaS platform that allows users to customize email templates using LiquidJS. The attacker creates a free account, navigates to the template editor, and submits a malicious layout file containing {% block header %}{% block header %}crash{% endblock %}{% endblock %}. When the platform's rendering engine processes this template for preview or email generation, the circular block reference triggers infinite recursion in the getBlockRender method. Memory consumption rapidly escalates to ~4GB within seconds, and the Node.js process terminates with a heap out-of-memory error. All users sharing the same application instance experience immediate service outage. The attacker can repeat the attack trivially by submitting new templates or triggering re-renders, causing sustained denial of service with minimal effort.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 24, 2026

Infinite recursion in LiquidJS template engine crashes Node.js processes via out-of-memory condition when attackers submit templates with circular block references. Unauthenticated remote attackers can consume ~4GB RAM and terminate any application accepting user-provided Liquid templates by nesting identically-named blocks within {% layout %} / {% block %} tags. Vendor patch available via GitHub commit e2311df. CVSS 7.5 (High) reflects network-accessible, low-complexity attack requiring no privileges or user interaction, causing complete availability loss.

RemediationAI

Immediately upgrade LiquidJS to the patched version containing commit e2311dfd6e82f73509308aa8a3a1fafc92e226f0 available from the official GitHub repository (https://github.com/harttle/liquidjs/commit/e2311dfd6e82f73509308aa8a3a1fafc92e226f0). Consult the GitHub security advisory GHSA-4rc3-7j7w-m548 for the specific release version number. If immediate patching is not feasible, implement template input validation to block nested blocks with identical names by parsing templates before rendering and rejecting structures where {% block X %} appears within another {% block X %}. Alternatively, enforce resource limits using Node.js --max-old-space-size flag (e.g., 512MB) combined with process monitoring to restart crashed instances, though this only mitigates impact and does not prevent the attack. For high-risk environments, disable user-submitted templates entirely or switch to a sandboxed template rendering service with isolated memory spaces per render operation. Note that memory limits will cause faster crashes but still result in service disruption; validation or patching are the only complete mitigations. Review application logs for abnormal memory growth patterns or OOM crashes as potential exploitation indicators.

Affected VersionsENISA

liquidjs < 10.25.7

Affected Packages

npm liquidjs fix: 10.25.7

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

LiquidJS is a JavaScript implementation of the Liquid template language for Node.js applications, commonly used in CMS platforms, email builders, static site generators, and multi-tenant SaaS products. The vulnerability resides in src/tags/block.ts where the getBlockRender method processes template inheritance. During OUTPUT mode, blocks retrieve their render functions from ctx.getRegister('blocks')[this.block]. When a child template defines a block with name 'a' nested inside another block also named 'a', the inner block's lookup retrieves the outer block's render function, which re-renders templates containing the inner block, creating unbounded recursion. This matches CWE-674 (Uncontrolled Recursion) where the code lacks termination conditions for self-referential template structures. The npm package identifier is pkg:npm/liquidjs, affecting applications that parse untrusted or user-influenced Liquid markup without input validation on block nesting patterns.

Know when Node.js gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 6.5 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Primary rating from NVD · only source for this CVE.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

4
Severity Changed
Jul 24, 2026 - 21:22 NVD
HIGH MEDIUM
CVSS changed
Jul 24, 2026 - 21:22 NVD
7.5 (HIGH) 6.5 (MEDIUM)
Patch released
Apr 24, 2026 - 16:00 nvd
Patch available
CVE Published
Apr 24, 2026 - 15:34 nvd
HIGH 7.5

DescriptionNVD

Summary

A circular block reference in {% layout %} / {% block %} causes an infinite recursive loop, consuming all available memory (~4GB) and crashing the Node.js process with FATAL ERROR: JavaScript heap out of memory. This allows any user who can submit a Liquid template to perform a Denial of Service attack.

Details

In src/tags/block.ts, during OUTPUT mode, each block looks up its render function from ctx.getRegister('blocks')[this.block]. When a block with name a is nested inside another block also named a in a child template, the inner block finds the outer block's render function and calls it. The outer block's templates contain the inner block again, creating infinite recursion with no termination condition.

Relevant code (src/tags/block.ts, getBlockRender method):

typescript
private getBlockRender (ctx: Context) {
  const { liquid, templates } = this
  const renderChild = ctx.getRegister('blocks')[this.block]
  const renderCurrent = function * (superBlock: BlockDrop, emitter: Emitter) {
    ctx.push({ block: superBlock })
    yield liquid.renderer.renderTemplates(templates, ctx, emitter)
    ctx.pop()
  }
  return renderChild
    ? (superBlock: BlockDrop, emitter: Emitter) => renderChild(
        new BlockDrop(
          (emitter: Emitter) => renderCurrent(superBlock, emitter)
        ),
        emitter)
    : renderCurrent
}

When renderChild exists (same-name block found), it calls renderChild which re-renders templates containing the nested block, which again finds renderChild, and so on - infinite loop.

PoC

1. Create a layout file (layout.html):

liquid
<header>{% block a %}default-a{% endblock %}</header>
<main>{% block b %}default-b{% endblock %}</main>
<footer>{% block c %}default-c{% endblock %}</footer>

2. Create a template that uses the layout:

liquid
{% layout "layout" %}
{% block a %}outer-a {% block a %}inner-a{% endblock %}{% endblock %}
{% block b %}content-b{% endblock %}
{% block c %}content-c{% endblock %}

3. Render:

javascript
const { Liquid } = require('liquidjs')
const liquid = new Liquid({ root: './', extname: '.html' })
liquid.renderFile('template').then(console.log)
// Result: process hangs, memory grows to ~4GB, then crashes with OOM

The anonymous block variant also triggers the same issue:

liquid
{% layout "parent" %}
{%block%}A{%block%}B{%endblock%}{%endblock%}

Impact

Denial of Service (DoS). Any application that accepts user-provided or user-influenced Liquid templates - such as CMS platforms, email template builders, multi-tenant SaaS products, or static site generators with untrusted input - can be crashed by a single malicious template. The attack requires no authentication beyond the ability to submit a template, and no special configuration. The Node.js process is killed by the OS due to memory exhaustion, causing complete service disruption.

Executive ViewAI

Why It Matters

CVE-2026-41311 is a high-severity denial-of-service vulnerability in LiquidJS that allows unauthenticated attackers to crash Node.js applications by submitting malicious templates containing circular block references, causing out-of-memory failures. Any organization running applications that accept user-supplied Liquid templates is at risk of service disruption without immediate patching.

Business Impact: High
Compensating Controls

Apply vendor patch. Interim mitigations (if patching delayed): implement template input validation to reject templates containing nested {% layout %} or {% block %} tags with identical names; enforce strict memory limits per Node.js process; rate-limit template submission endpoints; disable Liquid template functionality if not operationally required.

Threat Intelligence Overview

EPSS Score
0.0%
Top 89% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

CVE-2025-68613 HIGH POC
8.8 Dec 19

Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation

CVE-2024-41713 CRITICAL POC
9.1 Oct 21

A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could

CVE-2024-55591 CRITICAL POC
9.8 Jan 14

FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote

CVE-2023-44487 HIGH POC
7.5 Oct 10

Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour

CVE-2014-7205 CRITICAL POC
10.0 Oct 08

Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t

CVE-2025-59528 CRITICAL POC
10.0 Sep 22

Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete

CVE-2017-14849 HIGH POC
7.5 Sep 28

Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc

CVE-2017-5941 CRITICAL POC
9.8 Feb 09

An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2014-3744 HIGH POC
7.5 Oct 23

Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi

CVE-2014-9566 HIGH POC
7.5 Mar 10

Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin

CVE-2024-35286 CRITICAL POC
9.8 Oct 21

A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy