CVE-2026-35525: LiquidJS Root Restriction Bypass For Partial Vulnerability
HIGHCVE-2026-35525 is a HIGH (CVSS 7.5) root restriction bypass for partial vulnerability (CWE-61: UNIX Symbolic Link (Symlink) Following) affecting LiquidJS libraries in the npm ecosystem. The issue involves root restriction bypass for partial and layout loading through symlinked templates. Remediation is available by upgrading affected packages to version 10.25.3.
CVE-2026-35525 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2026-35525
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.
npm install liquidjs@10.25.3
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-35525, 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.25.3), 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-61: UNIX Symbolic Link (Symlink) Following, where the product, when opening a file or directory, does not sufficiently account for when the file is a symbolic link that resolves to a target outside of the intended control sphere. this could allow an attacker to cause the product to operate on unauthorized files. 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
CVE-2026-35525 Affected LiquidJS Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
liquidjs
|
npm |
< 10.25.3
|
10.25.3
|
References
Frequently Asked Questions
What is CVE-2026-35525?
Which LiquidJS versions are affected?
What version fixes CVE-2026-35525?
Is liquidjs affected?
What is the CVSS score of CVE-2026-35525?
What CWE is associated with CVE-2026-35525?
How can I check npm dependencies for CVE-2026-35525?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-56p5-8mhr-2fph",
"modified" : "2026-04-10T21:34:31Z",
"published" : "2026-04-08T15:03:47Z",
"aliases" : [ "CVE-2026-35525" ],
"summary" : "LiquidJS: Root restriction bypass for partial and layout loading through symlinked templates",
"details" : "### Summary\n\nLiquidJS enforces partial and layout root restrictions using the resolved pathname string, but it does not resolve the canonical filesystem path before opening the file. A symlink placed inside an allowed partials or layouts directory can therefore point to a file outside that directory and still be loaded.\n\n### Details\n\nFor `{% include %}`, `{% render %}`, and `{% layout %}`, LiquidJS checks whether the candidate path is inside the configured partials or layouts roots before reading it. That check is path-based, not realpath-based.\n\nBecause of that, a file like `partials/link.liquid` passes the directory containment check as long as its pathname is under the allowed root. If `link.liquid` is actually a symlink to a file outside the allowed root, the filesystem follows the symlink when the file is opened and LiquidJS renders the external target.\n\nSo the restriction is applied to the path string that was requested, not to the file that is actually read.\n\nThis matters in environments where an attacker can place templates or otherwise influence files under a trusted template root, including uploaded themes, extracted archives, mounted content, or repository-controlled template trees.\n\n### PoC\n\n```js\nconst { Liquid } = require('liquidjs');\nconst fs = require('fs');\n\nfs.rmSync('/tmp/liquid-root', { recursive: true, force: true });\nfs.mkdirSync('/tmp/liquid-root', { recursive: true });\n\nfs.writeFileSync('/tmp/secret-outside.liquid', 'SECRET_OUTSIDE');\nfs.symlinkSync('/tmp/secret-outside.liquid', '/tmp/liquid-root/link.liquid');\n\nconst engine = new Liquid({ root: ['/tmp/liquid-root'] });\n\nengine.parseAndRender('{% render \"link.liquid\" %}')\n .then(console.log);\n// SECRET_OUTSIDE\n```\n\n### Impact\n\nIf an attacker can place or influence symlinks under a trusted partials or layouts directory, they can make LiquidJS read and render files outside the intended template root. In practice this can expose arbitrary readable files reachable through symlink targets.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/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.25.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 10.25.2"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/harttle/liquidjs/security/advisories/GHSA-56p5-8mhr-2fph"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-35525"
}, {
"type" : "WEB",
"url" : "https://github.com/harttle/liquidjs/pull/867"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/harttle/liquidjs"
}, {
"type" : "WEB",
"url" : "https://github.com/harttle/liquidjs/releases/tag/v10.25.3"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-61" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-08T15:03:47Z",
"nvd_published_at" : "2026-04-08T20:16:24Z"
}
}