JLSEC-2026-1951: An incomplete fix for CVE-2024-36137 leaves `FileHandle.chmod()` and `FileHandle.chown()` in the...
An incomplete fix for CVE-2024-36137 leaves FileHandle.chmod() and FileHandle.chown() in the promises API without the required permission checks, while their callback-based equivalents (fs.fchmod(), fs.fchown()) were correctly patched.
As a result, code running under --permission with restricted --allow-fs-write can still use promise-based FileHandle methods to modify file permissions and ownership on already-open file descriptors, bypassing the intended write restrictions.
This vulnerability affects 20.x, 22.x, 24.x, and 25.x processes using the Permission Model where --allow-fs-write is intentionally restricted.
Affected Software
Event History
Child vulnerabilities
Contains the following vulnerabilities.
Frequently Asked Questions
Which deployments are exposed?
The affected scenario is a Node.js 20.x, 22.x, 24.x, or 25.x process using the Permission Model with --allow-fs-write intentionally restricted. The issue concerns permission-model enforcement rather than unrestricted filesystem access.
What access does an attacker need to exploit this?
They need to run code in the affected process and obtain an already-open file descriptor. The code can then call the promise-based FileHandle.chmod() or FileHandle.chown() methods to change permissions or ownership despite the restricted write allowance.
Are callback-based file descriptor operations affected?
The callback-based fs.fchmod() and fs.fchown() equivalents were correctly patched and are not described as affected. The bypass is limited to the promise-based FileHandle methods.
How can I determine whether a process is at risk?
Check whether the process runs with --permission and a deliberately restricted --allow-fs-write setting, and whether its code or dependencies use FileHandle.chmod() or FileHandle.chown() on open descriptors. The described affected process versions are 20.x, 22.x, 24.x, and 25.x.