CVE-2026-33287: LiquidJS has Exponential Memory Amplification through its replace_first Filter $& Pattern

CVE-2026-33287 · Severity: high · CVSS 7.5 · Published 2026-03-25

LiquidJS is a JavaScript template engine used in content management systems and SaaS platforms to render user-provided templates. The replace_first filter has a vulnerability that allows attackers to consume massive amounts of memory (up to 625,000 times more than the configured limit) while bypassing the engine's memory safeguards, causing the application to crash or become unresponsive.

Technologies: liquidjs (npm). Vendors: npm.

Quick answers

Is CVE-2026-33287 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-33287 being exploited in the wild.
How severe is CVE-2026-33287?
High severity, with a CVSS score of 7.5, published 25 March 2026.
Which products and versions are affected?
liquidjs (npm) < 10.25.1, SEMVER:introduced=0,last_affected=10.24.0.
Is there a fix for CVE-2026-33287?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-33287 attacked?
It is attacked over the network.
Am I affected by CVE-2026-33287?
Check whether you run liquidjs (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

The replace_first filter in LiquidJS delegates to JavaScript's native String.prototype.replace(), which interprets special patterns like $& (matched substring backreference). The vulnerability occurs because the filter charges memoryLimit only for the input string length, not the potentially amplified output. By chaining multiple replace_first operations with $& repetitions in the replacement string, an attacker can achieve exponential memory amplification (up to 625,000:1 ratio): a 1-byte input expanding through 5 stages produces 312.5 MB of output while only charging ~6.38 MB against the memory limit. The attack requires no authentication and can be triggered by submitting a malicious Liquid template. The sibling replace and replace_last filters are not vulnerable as they use safe string manipulation methods.

Affected products

  • harttle LiquidJS <= 10.24.x

Identifiers

  • CVE-2026-33287
  • GHSA-6q5m-63h6-5x4v

Timeline

  • 2026-03-25: disclosed
  • 2026-03-25: advisory

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.