CVE-2024-36137
npm vulnerability analysis and mitigation

Overview

A vulnerability (CVE-2024-36137) has been identified in Node.js, affecting users of the experimental permission model when the --allow-fs-write flag is used. The vulnerability was discovered in July 2024 and affects Node.js versions 20.x and 22.x. The issue exists because Node.js Permission Model does not operate on file descriptors, allowing operations such as fs.fchown or fs.fchmod to use a "read-only" file descriptor to change the owner and permissions of a file (NodeJS Blog).

Technical details

The vulnerability stems from a limitation in Node.js's experimental permission model where file descriptor operations bypass the intended access controls. When using the --allow-fs-write flag, operations like fs.fchown and fs.fchmod can manipulate file permissions and ownership through a read-only file descriptor, circumventing the permission model's restrictions. The vulnerability has been assigned a CVSS v3.0 score of 3.3 (LOW) with a vector of AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N (HackerOne).

Impact

The successful exploitation of this vulnerability could lead to unauthorized modification of file permissions and ownership, potentially compromising the security model's integrity. This affects users who specifically use the experimental permission model with the --allow-fs-write flag (NetApp Security).

Mitigation and workarounds

The vulnerability has been fixed in Node.js versions 22.4.1 and 20.15.1. Users are recommended to upgrade to these or later versions to address the security issue. The fix was implemented through a patch that properly handles file descriptor operations within the permission model (NodeJS Blog).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management