A flaw in Node.js’s Permissions model allows attackers to bypass `--allow-fs-read` and `--allow-fs-write` restrictions using crafted relative symlink paths. By chaining directories and symlinks, a script granted access only to the current directory can escape the allowed path and read sensitive files. This breaks the expected isolation guarantees and enables arbitrary file read/write, leading to potential system compromise. This vulnerability affects users of the permission model on Node.js v20, v22, v24, and v25.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:NNode.js
APPNodejs20.0.0 – 20.20.0 (bez)22.0.0 – 22.22.0 (bez)24.0.0 – 24.13.0 (bez)25.0.0 – 25.3.0 (bez)
Related vulnerabilities
Node.js TLS: błąd obsługi hostname z null-bajtem prowadzi do przekierowania authority
Node.js: obejście modelu uprawnień przez Unix Domain Socket
Command injection w aplikacjach Windows korzystających z CreateProcess
Path traversal w Permission Model Node.js przez monkey-patching Buffer
Various `node:fs` functions allow specifying paths as either strings or `Uint8Array` objects. In Node.js envir...