{"description":"Trending threats, MITRE ATT\u0026CK coverage, and detection metadata. Fed continuously.","feed_url":"https://feed.craftedsignal.io/products/liquidjs-template-engine/feed.json","home_page_url":"https://feed.craftedsignal.io/","items":[{"_cs_actors":[],"_cs_cpes":[],"_cs_cves":[],"_cs_exploited":false,"_cs_has_poc":false,"_cs_poc_references":[],"_cs_products":["LiquidJS Template Engine"],"_cs_severities":["high"],"_cs_tags":["liquidjs","symlink","template-injection","root-restriction-bypass"],"_cs_type":"advisory","_cs_vendors":["LiquidJS"],"content_html":"\u003cp\u003eLiquidJS, a popular template engine, is susceptible to a root restriction bypass (CVE-2026-35525) affecting versions 10.25.2 and below. The vulnerability stems from how LiquidJS handles partials and layouts. Specifically, it validates access based on the pathname string rather than resolving the canonical filesystem path. This allows an attacker to place a symlink within an allowed directory (partials or layouts) that points to a file outside of that directory. When LiquidJS attempts to render the template, it follows the symlink, effectively bypassing the intended root restriction. This issue arises in environments where attackers can influence template files, such as through uploaded themes, extracted archives, or repository-controlled template trees.\u003c/p\u003e\n\u003ch2 id=\"attack-chain\"\u003eAttack Chain\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eThe attacker gains the ability to influence or place files within a LiquidJS template directory. This could be via uploading themes, extracting archives, or modifying content within a repository.\u003c/li\u003e\n\u003cli\u003eThe attacker creates a symlink file, \u003ccode\u003elink.liquid\u003c/code\u003e, within the allowed \u003ccode\u003epartials\u003c/code\u003e or \u003ccode\u003elayouts\u003c/code\u003e directory.\u003c/li\u003e\n\u003cli\u003eThe symlink \u003ccode\u003elink.liquid\u003c/code\u003e is configured to point to a sensitive file outside the allowed template root (e.g., \u003ccode\u003e/etc/passwd\u003c/code\u003e).\u003c/li\u003e\n\u003cli\u003eThe attacker crafts a LiquidJS template containing an \u003ccode\u003e{% include %}\u003c/code\u003e, \u003ccode\u003e{% render %}\u003c/code\u003e, or \u003ccode\u003e{% layout %}\u003c/code\u003e tag that references the symlink \u003ccode\u003elink.liquid\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eLiquidJS processes the template and performs a path-based check on \u003ccode\u003elink.liquid\u003c/code\u003e, which passes because it resides within the allowed directory.\u003c/li\u003e\n\u003cli\u003eWhen LiquidJS attempts to read the template, the filesystem resolves the symlink to the targeted file (e.g., \u003ccode\u003e/etc/passwd\u003c/code\u003e).\u003c/li\u003e\n\u003cli\u003eLiquidJS renders the contents of the targeted file as part of the template output.\u003c/li\u003e\n\u003cli\u003eThe attacker gains access to the content of the sensitive file, potentially revealing sensitive information or configuration details.\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch2 id=\"impact\"\u003eImpact\u003c/h2\u003e\n\u003cp\u003eSuccessful exploitation allows attackers to read arbitrary files accessible to the LiquidJS process. This could lead to the disclosure of sensitive information such as configuration files, source code, or internal documentation. The impact is particularly severe in environments where LiquidJS is used to render user-supplied templates, as it enables privilege escalation or information leakage. The vulnerable package, \u003ccode\u003enpm/liquidjs\u003c/code\u003e (versions \u0026lt;= 10.25.2), is widely used in web applications.\u003c/p\u003e\n\u003ch2 id=\"recommendation\"\u003eRecommendation\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003eUpgrade LiquidJS to a version greater than 10.25.2 to remediate CVE-2026-35525.\u003c/li\u003e\n\u003cli\u003eImplement stricter file access controls and input validation to prevent attackers from placing or influencing files in template directories.\u003c/li\u003e\n\u003cli\u003eMonitor filesystem events for the creation of symlinks within template directories that point outside the allowed root. Use the \u003ccode\u003eFileCreate\u003c/code\u003e and \u003ccode\u003eTargetFilename\u003c/code\u003e fields in the provided Sigma rule to detect symlink creation.\u003c/li\u003e\n\u003cli\u003eDeploy the Sigma rules provided to detect the usage of \u003ccode\u003erender\u003c/code\u003e, \u003ccode\u003einclude\u003c/code\u003e, or \u003ccode\u003elayout\u003c/code\u003e tags referencing suspicious file paths in your environment.\u003c/li\u003e\n\u003c/ul\u003e\n","date_modified":"2024-01-29T12:00:00Z","date_published":"2024-01-29T12:00:00Z","id":"https://feed.craftedsignal.io/briefs/2024-01-29-liquidjs-symlink-bypass/","summary":"A vulnerability in LiquidJS allows attackers to bypass template root restrictions by using symlinks within allowed directories to render arbitrary files outside the intended scope, potentially leading to sensitive information disclosure.","title":"LiquidJS Template Engine Root Restriction Bypass via Symlink Exploitation","url":"https://feed.craftedsignal.io/briefs/2024-01-29-liquidjs-symlink-bypass/"}],"language":"en","title":"CraftedSignal Threat Feed - LiquidJS Template Engine","version":"https://jsonfeed.org/version/1.1"}