CVE-2026-35525
JavaScript vulnerability analysis and mitigation

Overview

CVE-2026-35525 is a symlink-following vulnerability in LiquidJS, a Shopify/GitHub Pages compatible JavaScript template engine, that allows attackers to bypass configured root directory restrictions and read arbitrary files on the server. The flaw affects all LiquidJS versions up to and including 10.25.2 (npm package liquidjs). It was published on April 8, 2026, with the fix released in version 10.25.3. The vulnerability carries a CVSS v3.1 score of 7.5 (High) and a CVSS v4.0 score of 8.2 (High) (GitHub Advisory, LiquidJS Advisory).

Technical details

The root cause is classified as CWE-61 (UNIX Symbolic Link Following): LiquidJS validates that template paths for {% include %}, {% render %}, and {% layout %} directives fall within the configured root, partials, or layouts directories using a string-based path check, but does not resolve the canonical filesystem path (realpath) before opening the file. As a result, a symlink placed inside an allowed directory (e.g., partials/link.liquid) passes the containment check because its pathname string is within the allowed root, but when the file is opened, the OS follows the symlink to its target outside the allowed directory. The fix, implemented in PR #867, changes the fs.contains function to use realpath for the containment check, ensuring the actual file location — not just the path string — is validated (LiquidJS Advisory, Fix PR).

Impact

Successful exploitation allows an attacker to read and render arbitrary files accessible to the LiquidJS process, bypassing the intended template root restrictions. This results in a high confidentiality impact — sensitive files such as application secrets, configuration files, credentials, or other data readable by the server process can be exfiltrated. There is no integrity or availability impact, but the data disclosure risk is significant in multi-tenant or user-controlled template environments such as platforms supporting uploaded themes, extracted archives, or repository-managed template trees (GitHub Advisory).

Exploitability

A proof-of-concept (PoC) is publicly available in the official security advisory, demonstrating the vulnerability by creating a symlink within the allowed root pointing to a file outside it and confirming LiquidJS renders the external file's contents (LiquidJS Advisory). Exploitation requires the attacker to be able to place or influence files (specifically symlinks) within a trusted template directory — a precondition present in environments with user-uploaded themes, extracted archives, or repository-controlled templates. The EPSS score is approximately 0.074% (22nd percentile), indicating low current exploitation probability. There is no evidence of in-the-wild exploitation or CISA KEV catalog inclusion at this time (GitHub Advisory).

Exploitation steps

  1. Identify a target: Locate a web application using LiquidJS (npm liquidjs <= 10.25.2) that allows users to upload or influence files within the configured template root directory (e.g., a theme upload feature, archive extraction, or repository-synced templates).
  2. Gain write access to the template root: Use an available upload or file-placement mechanism to write files into the application's partials or layouts directory. This may involve uploading a theme archive, committing to a repository, or exploiting another file-write primitive.
  3. Create a malicious symlink: Place a symbolic link inside the allowed template root that points to a sensitive file outside the root. For example:
    ln -s /etc/passwd /path/to/template-root/partials/evil.liquid
  4. Trigger template rendering: Craft a request to the application that causes LiquidJS to render a template referencing the symlink, such as:
    {% render "evil.liquid" %}
  5. Collect exfiltrated data: The application's response will contain the contents of the target file (e.g., /etc/passwd), as LiquidJS follows the symlink and renders the external file without restriction (LiquidJS Advisory).

Indicators of compromise

  • File System: Presence of unexpected symbolic links (.liquid files that are symlinks) within the application's configured template root, partials, or layouts directories pointing to locations outside those directories (e.g., /etc/, /var/, application config directories).
  • Logs: Application or web server logs showing template render requests referencing unusual or unexpected template names (e.g., filenames not matching legitimate theme assets); rendered responses containing content inconsistent with template output (e.g., system file contents).
  • Process: File access audit logs (e.g., via auditd on Linux) showing the Node.js process opening files outside the expected template root directory, particularly sensitive system files or application configuration files.

Mitigation and workarounds

Upgrade LiquidJS to version 10.25.3 or later, which resolves the issue by using realpath for filesystem containment checks in fs.contains (LiquidJS Release, Fix PR). As a defense-in-depth measure, restrict write access to template directories so that untrusted parties cannot create symlinks; consider deploying on filesystems or with OS-level configurations (e.g., nosymfollow mount option on Linux) that prevent symlink following. Additionally, run the LiquidJS process with the minimum necessary filesystem permissions to limit the scope of any potential file disclosure (GitHub Advisory).

Community reactions

The vulnerability was reported by security researcher Jvr2022 and addressed promptly by the LiquidJS maintainer (harttle), with the fix merged on April 6, 2026, and the advisory published on April 8, 2026 (LiquidJS Advisory). The release received positive community acknowledgment on GitHub. No significant broader media coverage or notable public researcher commentary beyond the advisory itself has been identified.

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-54155HIGH7.7
  • JavaScript logoJavaScript
  • node-opcua
NoNoAug 20, 2026
CVE-2026-54156HIGH7.5
  • JavaScript logoJavaScript
  • node-opcua
NoYesAug 20, 2026
CVE-2026-55451MEDIUM6.9
  • JavaScript logoJavaScript
  • gettext-converter
NoYesAug 20, 2026
CVE-2026-54150MEDIUM6.9
  • JavaScript logoJavaScript
  • next-video
NoYesAug 20, 2026
GHSA-ghvf-qf6h-g8x5HIGHN/A
  • JavaScript logoJavaScript
  • @nocobase/server
NoYesAug 20, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management