Vulnerabilities/

LiquidJS Has Memory Limit Bypass via Quadratic Amplification in `replace` Filter

Severity:
Low

Description

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.

Recommendation

Update the liquidjs package to the latest compatible version. Followings are version details:

References

Related Issues

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