CVE-2026-30952: LiquidJS Path Traversal Vulnerability
Summary
CVE-2026-30952: liquidjs has a path traversal fallback vulnerability. Affects liquidjs versions < 10.25.0. Fixed in 10.25.0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
LiquidJS is a powerful templating engine for JavaScript that allows developers to create dynamic web pages by rendering templates with data. It supports features like layout inheritance, includes, and custom filters, making it a popular choice for web applications. However, it has a vulnerability that allows for path traversal, which can lead to unauthorized file access.
Vulnerability Detail
The vulnerability in LiquidJS arises from the layout, render, and include tags, which permit arbitrary file access through absolute paths. This can occur via string literals or Liquid variables when the dynamicPartials option is enabled. If an attacker can control the template content or specify file paths, they can exploit this vulnerability to access sensitive files on the server, leading to potential data breaches.
How To Fix
Latest published version: 10.30.0 as of 22 Oct 2026
npm install liquidjs@10.30.0
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
10.25.0
This is the first release that contains the fix.
npm install liquidjs@10.25.0
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If immediate updating is not feasible, you can implement a workaround by modifying the file handling logic in the LiquidJS source code. Here is a code snippet to replace in the corresponding file (for CommonJS, it's dist/liquid.node.js):
if (fs.fallback !== undefined) {
const filepath = fs.fallback(file)
if (filepath !== undefined) {
for (const dir of dirs) {
if (!enforceRoot || this.contains(dir, filepath)) {
yield filepath
break
}
}
}
}
Conclusion
The LiquidJS path traversal vulnerability (CVE-2026-30952) poses a significant risk by allowing unauthorized file access through template rendering. It is crucial to update to the patched version 10.25.0 or implement the suggested workaround to mitigate this risk effectively.
See every vulnerability recorded for liquidjs →
FAQ
The CVSS score of this vulnerability is 8.7, indicating a high severity level.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
Exploitation of this vulnerability can lead to unauthorized access to sensitive files on the server, resulting in data breaches and potential compromise of the application.
Yes, the vulnerability has been patched in LiquidJS version 10.25.0. It is recommended to update to this version or later.
If you cannot update immediately, consider implementing the provided workaround to modify the file handling logic in the LiquidJS source code.
References
Related vulnerabilities
Recent vulnerabilities recorded for liquidjs.