Based on the original report by natann on HackerOne: https://hackerone.com/reports/3417819
Node.js has increasingly moved toward secure-by-default architectures. One of the most significant additions in recent years has been the Permission Model, a mechanism allowing developers to restrict what resources a script can access (such as the filesystem, child processes, or worker threads). However, implementing strict boundaries in a dynamic environment like JavaScript is notoriously difficult.
In this writeup, we will analyze a High-severity vulnerability (CVE-2025–55130) discovered by security researcher natann. This bug allowed attackers to bypass the --allow-fs-read and --allow-fs-write flags using crafted symbolic links, effectively escaping the sandbox and accessing sensitive system files.
The Node.js Permission Model allows users to run applications with the principle of least privilege. For example, if you run a script that only needs to process logs in a specific folder, you might use a command like this:
node --experimental-permission --allow-fs-read=./safe-folder index.jsThe expectation is that the script cannot read anything outside of ./safe-folder. If the script attempts to read /etc/passwd or ../secret_config.json, Node.js should throw a permission error.