Executive brief
LiquidJS, a popular template engine used for rendering web content, is vulnerable to a denial-of-service attack. By sending a specially crafted request containing unclosed HTML tags (like a script tag without a closing tag), an attacker can force the server to spend an excessive amount of time processing the data. This blocks the server's ability to handle other requests, potentially leading to a complete service outage and impacting business operations.
Technical details
The built-in `strip_html` filter in LiquidJS uses a regular expression with four lazy-quantified alternatives that exhibit quadratic backtracking (O(N²)) when processing inputs with many unclosed opener tokens (e.g., `<script`, `<style`, or `<!--`). Because the V8 regex engine performs exhaustive backtracking to find a matching closer that does not exist, the Node.js event loop becomes blocked, saturating CPU workers. A single unauthenticated request of approximately 350 KB can stall a process for 10 seconds, with the cost growing quadratically relative to input size. The vulnerability bypasses `memoryLimit` protections because the regex execution itself is unbounded. The issue was resolved in version 10.26.0 by replacing the regex with a linear single-pass scan.
Affected products
- harttle liquidjs <= 10.25.7
Timeline
- 2026-05-14: patched: Version 10.26.0 released with fix
- 2026-05-24: advisory: GitHub Security Advisory published
- 2026-06-17: disclosed: CVE-2026-45617 published to NVD