Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-45618

CVE-2026-45618: LiquidJS Template Engine RCE Vulnerability

CVE-2026-45618 is a remote code execution vulnerability in LiquidJS template engine that allows attackers to execute arbitrary code via crafted templates. This article covers the technical details, affected versions, and mitigation.

Published:

CVE-2026-45618 Overview

CVE-2026-45618 is an arbitrary code execution vulnerability in LiquidJS, a JavaScript template engine compatible with Shopify and GitHub Pages. Versions prior to 10.26.0 allow attackers to execute arbitrary code through crafted template input. The flaw is categorized under [CWE-94] Improper Control of Generation of Code, commonly known as code injection. Version 10.26.0 patches the issue.

Critical Impact

Attackers can execute arbitrary code within the context of the application by supplying crafted Liquid templates, potentially compromising the underlying host and pivoting into connected systems.

Affected Products

  • LiquidJS versions prior to 10.26.0
  • Applications embedding LiquidJS for server-side template rendering
  • Shopify and GitHub Pages compatible pipelines that consume untrusted templates

Discovery Timeline

  • 2026-08-11 - CVE-2026-45618 published to NVD
  • 2026-08-11 - Last updated in NVD database

Technical Details for CVE-2026-45618

Vulnerability Analysis

LiquidJS renders Liquid templates in Node.js and browser environments. The vulnerability allows crafted templates to break out of the intended template evaluation sandbox and execute arbitrary JavaScript in the host process. Applications that accept templates from untrusted users, such as multi-tenant SaaS platforms, content management systems, or email personalization services, are directly exposed.

The flaw is a code injection class issue tracked as [CWE-94]. Successful exploitation grants the attacker execution within the Node.js runtime, which typically has file system, network, and environment variable access. From that foothold, attackers can steal secrets, read source code, or move laterally.

Attack complexity is low and no authentication is required when the vulnerable service exposes template rendering to unauthenticated users. The scope change component indicates the impact extends beyond the vulnerable component itself.

Root Cause

The root cause is insufficient isolation between template expression evaluation and the surrounding JavaScript runtime. Certain template constructs are passed to a JavaScript evaluator without adequate sanitization, allowing attacker-controlled input to influence code that is subsequently executed by the interpreter.

Attack Vector

Exploitation requires the attacker to submit a crafted Liquid template to a vulnerable renderer. This can occur through web forms, API endpoints, uploaded theme files, or any integration path where user-supplied content is compiled by LiquidJS. See the GitHub Security Advisory GHSA-gf2q-c269-pqgc for maintainer-provided technical details.

No verified public exploitation code is available. The vulnerability mechanism is described in the maintainer advisory rather than reproduced here.

Detection Methods for CVE-2026-45618

Indicators of Compromise

  • Unexpected outbound network connections originating from the Node.js process that hosts LiquidJS rendering
  • New or modified files written by the application user in directories outside the template store
  • Anomalous child processes spawned by the Node.js runtime, such as shells, curl, or wget

Detection Strategies

  • Inventory dependencies using npm ls liquidjs or software composition analysis to identify versions earlier than 10.26.0
  • Log and inspect template inputs received from untrusted sources for suspicious constructs and unusually long expressions
  • Correlate rendering endpoint activity with process execution telemetry to identify code execution originating from template evaluation

Monitoring Recommendations

  • Alert on Node.js processes spawning interactive shells or scripting interpreters
  • Monitor egress traffic from application servers for connections to unknown destinations
  • Track template submission volume and content length to detect probing or fuzzing activity

How to Mitigate CVE-2026-45618

Immediate Actions Required

  • Upgrade LiquidJS to version 10.26.0 or later across all applications and build pipelines
  • Audit application code paths that accept templates from untrusted users and restrict access where possible
  • Rotate secrets and credentials accessible to the Node.js process if exploitation is suspected

Patch Information

The maintainers released the fix in LiquidJS v10.26.0. Update the dependency in package.json and rebuild all downstream artifacts. Verify transitive dependencies through lockfile inspection.

Workarounds

  • Restrict template submission to authenticated, trusted administrators until the patched version is deployed
  • Run the rendering service in a hardened sandbox or container with minimal file system, network, and secret access
  • Apply a web application firewall rule to reject requests containing Liquid syntax on endpoints that should not receive templates
bash
# Configuration example
npm install liquidjs@^10.26.0
npm ls liquidjs

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.