BIT-node-2026-123829: Node.js is vulnerable to Permission Model file-name disclosure via recursive fs.watch
A Permission Model bypass in Node.js recursive file watching discloses the names of files and directories the process is not permitted to read. On macOS and Windows, fs.watch() and fs.promises.watch() in recursive mode are backed by the native libuv watcher: FSEventWrap::Start checks kFileSystemRead only once, on the watched root, and FSEventWrap::OnEvent then forwards every filename libuv reports (relative paths at any depth) to the JavaScript callback without checking that each path is covered by the read grant. Code running under --permission with an exact read grant on a directory can therefore learn names such as sub/secret.txt even though readdir on that subdirectory is denied. The flaw exposes names and timing metadata, not file contents, and requires macOS or Windows plus files created under the watched directory by another actor. This vulnerability affects Node.js 26.x, 24.x, and 22.x.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
bitnami/nodeto a version that resolves this vulnerability.Fixed in 22.23.5 - Upgrade
Upgrade
bitnami/nodeto a version that resolves this vulnerability.Fixed in 24.22.3 - Upgrade
Upgrade
bitnami/nodeto a version that resolves this vulnerability.Fixed in 26.13.1 - Upgrade
Upgrade
bitnami/node-minto a version that resolves this vulnerability.Fixed in 22.23.5 - Upgrade
Upgrade
bitnami/node-minto a version that resolves this vulnerability.Fixed in 24.22.3 - Upgrade
Upgrade
bitnami/node-minto a version that resolves this vulnerability.Fixed in 26.13.1
Event History
Frequently Asked Questions
Which deployments are exposed to this disclosure?
The issue affects Node.js 26.x, 24.x, and 22.x on macOS or Windows. It requires use of the Permission Model and recursive fs.watch() or fs.promises.watch() on a directory with an exact read grant.
What must happen for an attacker to obtain information?
Code running with low privileges must be able to establish the recursive watch, and another actor must create files or directories below the watched root in locations the process cannot read. The watcher can then receive relative names for those paths.
Does this expose file contents?
No. The disclosed information is file and directory names and timing metadata; the described flaw does not provide access to file contents.
What can be done if updating Node.js is not immediately possible?
Avoid recursive fs.watch() and fs.promises.watch() under the Permission Model on macOS and Windows, particularly where the watch root contains subdirectories outside the process's read grant. Restrict untrusted code from creating watches or creating files beneath watched directories.