{"id":"CVE-2026-34166","published":"2026-04-08T17:52:05Z","modified":"2026-04-10T20:37:03Z","title":"LiquidJS has a Memory Limit Bypass via Quadratic Amplification in `replace` Filter","vendor":"harttle","product":"liquidjs","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":3.7,"severity":"LOW","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00514,"percentile":0.44709,"provenance":"source"},"cwes":[{"id":"CWE-400","name":"Uncontrolled Resource Consumption"}],"references":[{"url":"https://github.com/harttle/liquidjs/security/advisories/GHSA-mmg9-6m6j-jqqx","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/harttle/liquidjs/commit/abc058be0f33d6372cd2216f4945183167abeb25","tags":["x_refsource_MISC"]},{"url":"https://github.com/harttle/liquidjs/releases/tag/v10.25.3","tags":["x_refsource_MISC"]}],"priority":{"score":11.5,"factors":[{"name":"EPSS percentile","points":8.94},{"name":"CVSS severity","points":2.59}]},"vendorSlug":"harttle","affectedVersions":[{"vendor":"harttle","product":"liquidjs","versions":["< 10.25.3"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-04-10T20:36:50.442964Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"liquidjs","vulnerableRanges":["<10.25.3"],"patched":["10.25.3"],"from":["GHSA-mmg9-6m6j-jqqx"],"provenance":"source"}],"summary":{"text":"LiquidJS, a pure JavaScript template engine, has a flaw in its replace filter where memory accounting under the memoryLimit option undercounts the real output size, so the protection fails to stop oversized results. An attacker who can supply template content, with no authentication or user interaction required and with the memoryLimit option enabled, can craft input that expands to roughly 2,500 times the charged amount, potentially exhausting memory and causing an out-of-memory condition.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:02:05Z"},"euvd":{"id":"EUVD-2026-20554","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-harttle-liquidjs-cve-2022-25948","parents":[{"from":"CVE-2026-33287","to":"CVE-2026-34166","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:liquidjs","fromFixed":"10.25.1","toFixed":"10.25.3","daysApart":13},{"kind":"same-code","provenance":"machine","files":["src/filters/string.ts"],"commits":["https://github.com/harttle/liquidjs/commit/35d523026345d80458df24c72e653db78b5d061d","https://github.com/harttle/liquidjs/commit/abc058be0f33d6372cd2216f4945183167abeb25"],"basis":"rarely changed file"}]}],"children":[{"from":"CVE-2026-34166","to":"CVE-2026-69222","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/filters/string.ts"],"commits":["https://github.com/harttle/liquidjs/commit/abc058be0f33d6372cd2216f4945183167abeb25","https://github.com/harttle/liquidjs/commit/7ab49f999ac045ec1e87f3a7a9fd68dd9e8602b3"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2022-25948","published":"2022-12-23","fixed":"10.0.0","kev":false},{"cve":"CVE-2026-30952","published":"2026-03-10","fixed":"10.25.0","kev":false},{"cve":"CVE-2026-33287","published":"2026-03-26","fixed":"10.25.1","kev":false},{"cve":"CVE-2026-34166","published":"2026-04-08","fixed":"10.25.3","kev":false},{"cve":"CVE-2026-35525","published":"2026-04-08","fixed":"10.25.3","kev":false},{"cve":"CVE-2026-39412","published":"2026-04-08","fixed":"10.25.4","kev":false,"link":{"from":"CVE-2026-34166","to":"CVE-2026-39412","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"npm:liquidjs","fromFixed":"10.25.3","toFixed":"10.25.4","daysApart":0}]}},{"cve":"CVE-2026-39859","published":"2026-04-08","fixed":"10.25.5","kev":false}],"package":"npm:liquidjs"}}