Vulnerability in Node.js Experimental Permission Model

nodejs Updated 02 Oct 2025

Summary

07/09/2024
N/A
Yes i
Unrated
Not published

CVE-2024-36137: A vulnerability has been identified in Node.js, affecting users of the experimental permission model when the --allow-fs-write flag is used. Affects nodejs versions < 20.15.1-r0. Fixed in 20.15.1-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Node.js is a popular open-source JavaScript runtime built on Chrome's V8 JavaScript engine. It allows developers to build scalable network applications. The experimental permission model in Node.js provides a way to control access to various resources. However, a vulnerability has been discovered in this model when the --allow-fs-write flag is used.

Vulnerability Detail

The Node.js Permission Model does not properly handle file descriptors when performing certain operations like fs.fchown or fs.fchmod. This can allow an attacker with read-only access to a file descriptor to change the owner and permissions of a file. This vulnerability can be exploited to gain unauthorized access to sensitive files or modify critical system files.

How To Fix

Minimum fixed version

20.15.1-r0

This is the first release that contains the fix.

sudo apk add --upgrade nodejs

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is currently no known workaround for this vulnerability. It is essential to apply the recommended fix by updating Node.js to the patched version.

Conclusion

A vulnerability has been identified in the experimental permission model of Node.js, allowing an attacker with read-only access to a file descriptor to change file ownership and permissions. This can lead to unauthorized access or modification of sensitive files. It is recommended to update Node.js to version 20.15.1-r0 or later to mitigate this vulnerability.

See every vulnerability recorded for nodejs →

Share this vulnerability

FAQ

Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. It allows developers to run JavaScript code outside of a web browser, making it suitable for server-side and networking applications.

The experimental permission model in Node.js provides a way to control access to various resources, allowing developers to define fine-grained permissions for different operations.

This vulnerability affects users of the experimental permission model in Node.js who use the --allow-fs-write flag. It allows an attacker with read-only access to a file descriptor to change the owner and permissions of a file, potentially leading to unauthorized access or modification of sensitive files.

To fix this vulnerability, update Node.js to version 20.15.1-r0 or later. Additionally, ensure that the experimental permission model is used correctly and avoid exposing unnecessary read-only file descriptors.

No, there is currently no known workaround for this vulnerability. It is crucial to apply the recommended fix by updating Node.js to the patched version.

Related vulnerabilities

Recent vulnerabilities recorded for nodejs.

How To Fix

Minimum fixed version

20.15.1-r0

This is the first release that contains the fix.

sudo apk add --upgrade nodejs

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback