CVE-2026-35525

LiquidJS has a root restriction bypass for partial and layout loading through symlinked templates

Published Apr 8, 2026 CVSS 4.0 · 8.2 High EPSS < 1% KEV · Not listed
Description
LiquidJS is a Shopify / GitHub Pages compatible template engine in pure JavaScript. Prior to 10.25.3, for {% 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. Because 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. So the restriction is applied to the path string that was requested, not to the file that is actually read. This 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. This vulnerability is fixed in 10.25.3.

Analysis

AI-generated

Technical impact

This vulnerability occurs when LiquidJS loads partial or layout templates through {% include %}, {% render %}, or {% layout %} tags. The engine checks that the requested path is inside the configured root directories using a string comparison, but it does not resolve the actual filesystem path. Therefore a symlink placed under the partials or layouts root that points to a file outside the allowed directory can be loaded and executed. An attacker who can create or modify a symlink in the trusted template tree can thus have LiquidJS render a malicious template or read sensitive files, which may lead to remote code execution or information disclosure. The flaw is a classic path‑traversal/symlink abuse (CWE‑61).

Affected Systems

Products affected are LiquidJS libraries released by harttle. Any installation using a version earlier than 10.25.3 is vulnerable. The issue is documented for all variants of LiquidJS that support include, render, or layout tags, as the root restriction check is universal across them.

Risk and Exploitability

The CVSS base score for this flaw is 8.2, indicating a high severity. Attackers require the ability to place or modify a symlink within the allowed partials or layout directories, a capability that exists in environments where user input can influence uploaded themes, theme archives, or repository‑controlled template trees. The EPSS score is below 1 %, suggesting few exploitable public deployments at present, and the vulnerability is not present in CISA's KEV catalog. Nonetheless, once an attacker can write to the template root, exploitation is straightforward and could achieve code execution under the privileges of the running application. Implementing the fix removes the path containment flaw and eliminates the possibility of executing unintended templates.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update LiquidJS to version 10.25.3 or later to eliminate the path restriction bypass.
  • Ensure that directories used for partials and layouts are not writable by untrusted users and that symlinks are not allowed in those directories.
  • Review existing templates for unexpected symlinks and remove any that point outside the intended directory.

Generated by OpenCVE AI on April 10, 2026 at 22:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-56p5-8mhr-2fph LiquidJS: Root restriction bypass for partial and layout loading through symlinked templates
History
Type Values Removed Values Added
First Time appeared Liquidjs
Liquidjs liquidjs
CPEs cpe:2.3:a:liquidjs:liquidjs:*:*:*:*:*:node.js:*:*
Vendors & Products Liquidjs
Liquidjs liquidjs
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'}

Type Values Removed Values Added
First Time appeared Harttle
Harttle liquidjs
Vendors & Products Harttle
Harttle liquidjs
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description LiquidJS is a Shopify / GitHub Pages compatible template engine in pure JavaScript. Prior to 10.25.3, for {% 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. Because 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. So the restriction is applied to the path string that was requested, not to the file that is actually read. This 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. This vulnerability is fixed in 10.25.3.
Title LiquidJS has a root restriction bypass for partial and layout loading through symlinked templates
Weaknesses CWE-61
References
Metrics cvssV4_0

{'score': 8.2, 'vector': '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'}

Weaknesses
  • CWE-61

    UNIX Symbolic Link (Symlink) Following

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 8, 2026, 7:53 PM
Reserved
Apr 3, 2026, 2:15 AM
Status
Analyzed
Published
Apr 8, 2026, 8:16 PM
Modified
Jul 24, 2026, 9:10 PM