Breaking the Box: bypassing Node.js Filesystem Permissions via Symlinks (CVE-2025–55130)
The Node.js Permission Model failed to properly resolve relative symbolic link chains before checking whether a file access was allowed. An attacker running code inside a restricted Node.js environment could read or overwrite files outside the allowed directory, such as system configuration files or SSH keys.
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).
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The permission model validated the symlink's own location instead of resolving the symlink to its final target before deciding whether access was allowed.
Impact
An attacker with code execution inside a restricted Node.js process could read arbitrary files such as SSH keys and environment variables, or overwrite critical files, potentially leading to full system compromise.
What the attacker needed
Ability to run code in a restricted Node.js process; permission model enabled with fs read/write flags
The fix
The vulnerability was fixed by updating Node.js to the latest patch releases, which apply stricter path resolution so that the real path is consulted before access is granted.
How it was found
- Create a nested directory inside the allowed area.
- Create a relative symlink inside that directory pointing outside the allowed area to a sensitive file.
- Read the symlink path; the permission check approves it because the link file sits inside the allowed directory, while the operating system follows it to the restricted file.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Node.js added a feature that lets you run a script with access only to certain folders. A symbolic link (symlink) is like a shortcut file that points to another file elsewhere. The check looked at where the shortcut file sat, not where it actually led, so a shortcut placed inside the allowed folder could point to a secret file outside it and the script could still open it.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.