CVE-2026-21716

NameCVE-2026-21716
DescriptionAn 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.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
ReferencesDSA-6183-1

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
nodejs (PTS)bullseye12.22.12~dfsg-1~deb11u4fixed
bullseye (security)12.22.12~dfsg-1~deb11u7fixed
bookworm, bookworm (security)18.20.4+dfsg-1~deb12u1fixed
trixie20.19.2+dfsg-1vulnerable
trixie (security)20.19.2+dfsg-1+deb13u2fixed
forky22.22.2+dfsg+~cs22.19.15-3fixed
sid24.15.0+dfsg+~cs24.12.2-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
nodejssourcebullseye(not affected)
nodejssourcebookworm(not affected)
nodejssourcetrixie20.19.2+dfsg-1+deb13u2DSA-6183-1
nodejssource(unstable)22.22.2+dfsg+~cs22.19.15-1

Notes

[bookworm] - nodejs <not-affected> (Feature was introduced in nodeJS 20)
[bullseye] - nodejs <not-affected> (Feature was introduced in nodeJS 20)
https://nodejs.org/en/blog/vulnerability/march-2026-security-releases#cve-2024-36137-patch-bypass---filehandlechmodchown-cve-2026-21716---low
Fixed by: https://github.com/nodejs/node/commit/012330956669e06864a674917de352d2d69ff51c (v20.20.2)
Feature introduced in 20 see https://nodejs.org/en/blog/announcements/v20-release-announce
Documentation of the flag: https://nodejs.org/api/cli.html#--experimental-permission (Added in v20.0.0)

Search for package or bug name: Reporting problems