FS Permissions Bypass
A flaw in Node.js's permission model lets a script escape the directory it was allowed to access by using crafted relative symlink paths. An attacker could then read or write files outside the permitted path, breaking the isolation the model is meant to provide.
- Triaged in 21 hours
- Fixed in 2 months
- Disclosed after 3 months
Summary by the program
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.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the permission check resolves or compares paths without properly accounting for relative symlinks that point outside the allowed directory.
Impact
An attacker could read or write arbitrary files outside the allowed path, potentially leading to system compromise.
What the attacker needed
Node.js permission model enabled; ability to run a crafted script
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 report has not been written yet. The Original tab links to the source.
Node.js has a feature that lets you run a script with access limited to certain folders. This report says that limit can be tricked using a special kind of shortcut called a symlink, so the script can reach files it should not. That means someone running untrusted code might have their other files exposed.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.