CVE-2026-34166

LiquidJS has a Memory Limit Bypass via Quadratic Amplification in `replace` Filter

Published Apr 8, 2026 CVSS 3.1 · 3.7 Low EPSS < 1% KEV · Not listed
Description
LiquidJS is a Shopify / GitHub Pages compatible template engine in pure JavaScript. Prior to 10.25.3, the replace filter in LiquidJS incorrectly accounts for memory usage when the memoryLimit option is enabled. It charges str.length + pattern.length + replacement.length bytes to the memory limiter, but the actual output from str.split(pattern).join(replacement) can be quadratically larger when the pattern occurs many times in the input string. This allows an attacker who controls template content to bypass the memoryLimit DoS protection with approximately 2,500x amplification, potentially causing out-of-memory conditions. This vulnerability is fixed in 10.25.3.

Analysis

AI-generated

Technical impact

The replace filter in LiquidJS miscalculates memory consumption when the memoryLimit option is active. It accounts only for the lengths of the source string, the pattern, and the replacement, yet the actual output from str.split(pattern).join(replacement) can explode quadratically when the pattern occurs many times. An attacker who controls template content can craft input that amplifies the output by roughly 2,500×, thereby evading the memory limiter and forcing an out‑of‑memory condition, which can crash the service or kill processes.

Affected Systems

LiquidJS implementations bundled by Harttle are affected in all versions earlier than 10.25.3. The vulnerability exists in the patch‑free code base that ships with these older releases and is fixed in 10.25.3 and newer.

Risk and Exploitability

The CVSS score of 3.7 indicates a moderate severity. The EPSS score of less than 1 % suggests a low likelihood of exploitation in the wild, and the vulnerability is not listed in CISA’s KEV catalog. Exploitability requires the attacker to control template content and have the application run LiquidJS with the memoryLimit option enabled; no local privilege escalation or network attack vector is needed.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade LiquidJS to version 10.25.3 or later.

Generated by OpenCVE AI on April 10, 2026 at 22:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-mmg9-6m6j-jqqx LiquidJS Has Memory Limit Bypass via Quadratic Amplification in `replace` Filter
History
Type Values Removed Values Added
First Time appeared Liquidjs
Liquidjs liquidjs
CPEs cpe:2.3:a:liquidjs:liquidjs:*:*:*:*:*:node.js:*:*
Vendors & Products Liquidjs
Liquidjs liquidjs
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Harttle
Harttle liquidjs
Vendors & Products Harttle
Harttle liquidjs
Type Values Removed Values Added
Description LiquidJS is a Shopify / GitHub Pages compatible template engine in pure JavaScript. Prior to 10.25.3, the replace filter in LiquidJS incorrectly accounts for memory usage when the memoryLimit option is enabled. It charges str.length + pattern.length + replacement.length bytes to the memory limiter, but the actual output from str.split(pattern).join(replacement) can be quadratically larger when the pattern occurs many times in the input string. This allows an attacker who controls template content to bypass the memoryLimit DoS protection with approximately 2,500x amplification, potentially causing out-of-memory conditions. This vulnerability is fixed in 10.25.3.
Title LiquidJS has a Memory Limit Bypass via Quadratic Amplification in `replace` Filter
Weaknesses CWE-400
References
Metrics cvssV3_1

{'score': 3.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L'}

Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 10, 2026, 8:37 PM
Reserved
Mar 25, 2026, 8:12 PM
Status
Analyzed
Published
Apr 8, 2026, 7:25 PM
Modified
Jul 24, 2026, 10:10 PM