LiquidJS versions prior to 10.25.1 contain a vulnerability in the replace_first filter where the use of JavaScript's String.prototype.replace() with the $& pattern leads to exponential memory amplification. The filter only accounts for the input string length against a memory limit, not the potentially much larger output string. An attacker can exploit this to cause denial of service by generating output strings hundreds of thousands of times larger than the input while staying within the memory limit.