CVE-2026-106071
Patch Available.
This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.
Overview
Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. It uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, and it is widely used for web applications and server-side development. Node.js includes an opt-in Permission Model that lets an application restrict its own access to the file system, child processes, and other capabilities at startup.
An authorization bypass vulnerability (CVE-2026-106071) has been identified in the Node.js Permission Model's filesystem enforcement, which allows code running under the Permission Model to read or write paths that do not match a wildcard --allow-fs-read or --allow-fs-write rule. For example, --allow-fs-read=/etc/passwd.* also allows reading /etc/passwd.
Per OWASP: Access control enforces policy such that users cannot act outside of their intended permissions. Failures typically lead to unauthorized information disclosure, modification, or destruction of all data or performing a business function outside the user's limits.
This issue affects the 26.x release line of Node.js up to and including 26.12.0.
Details
Module Info
- Product: Node.js
- Affected packages:
node - Affected versions: >=26.0.0 <=26.12.0
- GitHub repository: https://github.com/nodejs/node
- Published packages: https://github.com/nodejs/node/releases/tag/v26.12.0
- Package manager: Not applicable. Node.js is distributed as runtime builds from nodejs.org rather than as a published npm package.
- Fixed in:
- OSS Node.js 26.12.1
Vulnerability Info
This Low-severity vulnerability is found in the node package in the 26.x release line of Node.js. The same lookup code is also present in the End-of-Life Node.js 20.x release line, where the Permission Model is enabled with --experimental-permission.
When the Permission Model is enabled, each path granted with --allow-fs-read or --allow-fs-write is stored in a radix tree, and every filesystem access is checked by walking that tree. A grant that ends in * is a wildcard: it matches the literal prefix before the * followed by any further characters. While walking the tree, FSPermission::RadixTree::Node::NextNode in src/permission/fs_permission.h compares the remaining part of the requested path against the stored prefix of the next child node:
auto child = it->second;
// match prefix
size_t prefix_len = child->prefix.length();
for (size_t i = 0; i < path.length(); ++i) {
if (i >= prefix_len || child->prefix[i] == '*') {
return child;
}
...
if (path[idx++] != child->prefix[i]) {
return nullptr;
}
}
return child;
The loop is bounded by the length of the requested path rather than the length of the child's prefix. When the requested path is shorter than the prefix of a wildcard grant, the loop runs out of path characters before it has compared the whole prefix or reached the *, and then falls through to return child;, reporting the wildcard node as a match. A grant of /etc/passwd.* therefore also matches /etc/passwd, because every character of /etc/passwd matches the start of the stored prefix and the comparison stops before the required ..
The over-grant applies when the wildcard grant sits directly under the root of the permission tree, for example when it is the only grant for that scope. Code running inside the sandbox can then read, or with --allow-fs-write write, files the operator never allowed, as long as their paths are leading substrings of a wildcard grant.
Steps to Reproduce
1. Install an affected Node.js 26.x release (for example 26.12.0).
2. Start Node.js with the Permission Model enabled and a single wildcard read grant, then check and read a path that is shorter than the grant:
node --permission --allow-fs-read='/etc/passwd.*' -e "
console.log(process.permission.has('fs.read', '/etc/passwd'));
console.log(require('fs').readFileSync('/etc/passwd', 'utf8').split('\n')[0]);
"
3. On an affected version, process.permission.has() prints true and the first line of /etc/passwd is printed, even though /etc/passwd does not match /etc/passwd.*. On a fixed version, has() prints false and the read fails with ERR_ACCESS_DENIED.
Mitigation
Node.js release lines prior to v22 are End-of-Life and will not receive any upstream updates to address this issue. For more information see here.
Users of the affected components should apply one of the following mitigations:
- Upgrade to a supported Node.js release that carries the fix (v26.12.1 or later).
- Migrate affected applications away from the End-of-Life Node.js release lines.
- Leverage a commercial support partner like HeroDevs for post-EOL security support.
Credits
- malikhamzaiqbal (finder)