Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-33287: CWE-20: Improper Input Validation in harttle liquidjs

0
High
VulnerabilityCVE-2026-33287cvecve-2026-33287cwe-20cwe-400
Published: Thu Mar 26 2026 (03/26/2026, 00:33:20 UTC)
Source: CVE Database V5
Vendor/Project: harttle
Product: liquidjs

Description

LiquidJS is a Shopify / GitHub Pages compatible template engine in pure JavaScript. Prior to version 10.25.1, the `replace_first` filter in LiquidJS uses JavaScript's `String.prototype.replace()` which interprets `$&` as a back reference to the matched substring. The filter only charges `memoryLimit` for the input string length, not the amplified output. An attacker can achieve exponential memory amplification (up to 625,000:1) while staying within the `memoryLimit` budget, leading to denial of service. Version 10.25.1 patches the issue.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 03/26/2026, 01:16:19 UTC

Technical Analysis

LiquidJS is a JavaScript-based template engine compatible with Shopify and GitHub Pages. The vulnerability CVE-2026-33287 stems from the `replace_first` filter's use of JavaScript's native String.prototype.replace() function, which interprets special replacement patterns like `$&` as references to the matched substring. The filter enforces a memory limit based on the input string length but does not account for the potential output size amplification caused by these replacement patterns. An attacker can exploit this by submitting crafted input that triggers exponential memory amplification—up to 625,000 times the original input size—leading to excessive memory consumption and denial of service. This is a classic case of improper input validation (CWE-20) combined with resource exhaustion (CWE-400). The vulnerability affects all LiquidJS versions prior to 10.25.1, which includes many deployments in e-commerce and static site generation contexts. The patch in version 10.25.1 addresses this by properly limiting output amplification and validating inputs to prevent excessive memory usage. No known exploits are currently in the wild, but the ease of exploitation and impact make this a critical issue to address.

Potential Impact

The primary impact of this vulnerability is denial of service due to memory exhaustion. Attackers can remotely trigger the vulnerability without authentication or user interaction, making it highly accessible. Exploitation can cause web servers or applications using vulnerable LiquidJS versions to crash or become unresponsive, disrupting services and potentially causing financial and reputational damage. Since LiquidJS is used in Shopify-compatible environments and GitHub Pages, popular platforms with global reach, the scope of affected systems is broad. Organizations relying on these platforms for e-commerce or content delivery may face downtime, loss of customer trust, and operational disruptions. Additionally, the resource exhaustion could be leveraged as part of a larger attack campaign to degrade infrastructure availability.

Mitigation Recommendations

1. Upgrade all instances of LiquidJS to version 10.25.1 or later, where the vulnerability is patched. 2. Implement input validation and sanitization at the application layer to detect and reject suspicious replacement patterns, especially those involving `$&` or other special replacement tokens. 3. Employ runtime memory monitoring and limits at the container or process level to detect abnormal memory usage spikes and terminate affected processes proactively. 4. Use Web Application Firewalls (WAFs) with custom rules to block requests containing suspicious payloads targeting the `replace_first` filter. 5. Conduct code reviews and security testing focusing on template engines and string manipulation functions to identify similar amplification risks. 6. Educate developers on the risks of using native string replacement functions without proper output size checks in templating contexts.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-03-18T18:55:47.426Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 69c4854ef4197a8e3b9c70bf

Added to database: 3/26/2026, 1:01:02 AM

Last enriched: 3/26/2026, 1:16:19 AM

Last updated: 3/26/2026, 3:31:57 AM

Views: 6

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses