Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
Low

Node.js Permission Model file descriptor write bypass via fs.fchown/fs.fchmod

IdentifiersCVE-2024-36137CWE-284

CVE-2024-36137 is a vulnerability in Node.js affecting the experimental Permission Model when filesystem write permissions are configured with the --allow-fs-write flag. The issue arises because the Permission Model does not enforce permissions on file descriptor-based operations. As a result, functions such as fs.fchown() and fs.fchmod() can operate on an already-open file descriptor, including one opened in read-only mode, to modify file ownership or file mode bits without the expected write-permission enforcement. This creates a gap between path-based permission checks and descriptor-based filesystem mutation APIs, allowing unauthorized metadata changes to files that should be protected by the Permission Model.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows an attacker who can execute JavaScript within a Node.js process using the experimental Permission Model to bypass intended filesystem write restrictions and alter file metadata. Specifically, the attacker may change file ownership or permissions on files reachable through an existing file descriptor, undermining integrity controls and potentially enabling follow-on abuse such as loosening access controls on sensitive files or preparing files for later modification by other processes or users.

Mitigation

If you can’t patch tonight, do this now.

If immediate patching is not possible, avoid relying on the experimental Permission Model as a strong isolation boundary for filesystem metadata operations. Minimize or eliminate use of --allow-fs-write in untrusted execution contexts, avoid exposing already-open file descriptors to untrusted code, and restrict execution of untrusted JavaScript within the affected Node.js process. Additional OS-level controls such as filesystem permissions, container isolation, and MAC frameworks should be used to limit impact.

Remediation

Patch, then assume compromise.

Upgrade Node.js to a vendor-fixed release that addresses CVE-2024-36137. The provided advisory context indicates patched versions were released in the July 2024 Node.js security update for active lines: v18.20.4, v20.15.1, and v22.4.1. Ensure all affected runtimes and downstream packaged distributions are updated to a version containing the fix.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity4

Community discussion across Reddit, Mastodon, and other social sources.