Skip to content
Access control Disclosed report Intermediate CVE-2026-21716

CVE-2024-36137 Patch Bypass - FileHandle.chmod/chown

The fix for CVE-2024-36137 only added permission checks to the callback-based file descriptor methods, leaving the promise-based FileHandle equivalents unchecked. Code running under the Permission Model with restricted write access could still change permissions and ownership on an already-open file descriptor.

wooseokdotkim Follow

Originally disclosed on HackerOne

  • Triaged in 3 days
  • Fixed in 4 months
  • Disclosed after 4 months

Summary by the program

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.

The original report as published on HackerOne, by wooseokdotkim. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 patch for CVE-2024-36137 added permission checks only to the callback-based fs.fchmod and fs.fchown paths and did not apply the same checks to the promise-based FileHandle.chmod and FileHandle.chown methods.

Impact

Code running under the Permission Model with a restricted --allow-fs-write could still change file permissions and ownership on an already-open file descriptor, bypassing the intended write restriction.

What the attacker needed

Node.js Permission Model enabled; restricted --allow-fs-write; an already-open file descriptor

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 mode that lets you run code with only limited access to the file system. A previous security fix closed one way of changing a file's permissions and owner, but a second, newer way of doing the same thing was missed, so restricted code could still make those changes.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More from Node.js

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.