Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconSubmit malicious template with circular block reference
-
DeliveryTemplate parser accepts nested identical block names
-
ExploitRenderer invokes getBlockRender method
-
InstallInner block lookup finds outer block's render function
-
C2Outer block re-renders templates containing inner block
-
ExecuteInfinite recursive loop consumes memory
-
ImpactNode.js heap grows to ~4GB
-
Step 8Process crashes with OOM error
-
Step 9Complete 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 |
| 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 |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
Lifecycle Timeline
4DescriptionNVD
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):
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):
<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:
{% layout "layout" %}
{% block a %}outer-a {% block a %}inner-a{% endblock %}{% endblock %}
{% block b %}content-b{% endblock %}
{% block c %}content-c{% endblock %}3. Render:
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 OOMThe anonymous block variant also triggers the same issue:
{% 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.
Blast Radius
ecosystem impact- 28 npm packages depend on liquidjs (11 direct, 17 indirect)
Ecosystem-wide dependent count for version 10.25.7.
Executive ViewAI
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.
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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation
A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could
FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote
Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour
Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t
Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete
Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc
An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner
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
Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi
Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin
A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond
EUVD-2026-28886
GHSA-4rc3-7j7w-m548
NVD
CVE.org
EPSS
VulDB
Exploit-DB