Vulnerabilities/

LiquidJS has Exponential Memory Amplification through its replace_first Filter $& Pattern

Severity:
High

Description

The replace_first filter in LiquidJS uses JavaScript’s String.prototype.replace() which interprets $& as a backreference to the matched substring. The filter only charges memoryLimit for the input string length, not the amplified output.

Recommendation

No fix is available yet. Followings are affected versions:

References

Related Issues

Tags:
npm
liquidjs
Anything's wrong? Let us know Last updated on March 25, 2026