Vulnerability library
Security checkApril 09, 2026

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

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

Low severitynpmliquidjs

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

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:

  • Affected version(s): <= 10.25.2
  • Patched version(s): 10.25.3

References

Could your website be exposed too?

SmartScanner can check your website for LiquidJS Has Memory Limit Bypass via Quadratic Amplification in `replace` Filter and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated April 09, 2026