Node.js Vulnerability in Experimental Permission Model - CVE-2024-36137

nodejs Updated 03 Oct 2025

Summary

07/09/2024
N/A
Yes i
Low
3.3

UBUNTU-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.16.0+dfsg-1ubuntu1. Fixed in 20.16.0+dfsg-1ubuntu1. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Node.js is a popular open-source runtime environment that allows developers to execute JavaScript code server-side. It is widely used for building scalable network applications. The package in question, 'nodejs', provides the core functionality of Node.js, including APIs for file system operations, networking, and more. This vulnerability affects users who utilize the experimental permission model with the --allow-fs-write flag, which is designed to enhance security by controlling file system access.

Vulnerability Detail

A vulnerability has been identified in Node.js related to its experimental permission model. When the --allow-fs-write flag is used, the permission model does not operate on file descriptors. This allows operations such as fs.fchown or fs.fchmod to exploit a 'read-only' file descriptor to change the owner and permissions of a file. This could lead to unauthorized access or modification of files, posing a significant security risk to applications relying on this feature.

How To Fix

Minimum fixed version

20.16.0+dfsg-1ubuntu1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade nodejs

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

Workaround

As a temporary workaround, users can avoid using the --allow-fs-write flag in their Node.js applications until they can update to the patched version.

Conclusion

The vulnerability CVE-2024-36137 in Node.js poses a significant risk to applications using the experimental permission model with the --allow-fs-write flag. It is crucial for users to update to the patched version to mitigate this risk. Additionally, utilizing tools like Vulert can help monitor for such vulnerabilities in real-time.

See every vulnerability recorded for nodejs →

Share this vulnerability

FAQ

CVE-2024-36137 is a vulnerability in Node.js that affects the experimental permission model when the --allow-fs-write flag is used.

This vulnerability can allow unauthorized changes to file ownership and permissions, potentially compromising the security of your application.

As a temporary measure, refrain from using the --allow-fs-write flag until you can update to the patched version.

You can find detailed information about CVE-2024-36137 in the official Ubuntu security notices or on the CVE database.

You can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities using just a manifest file like package-lock.json.

Related vulnerabilities

Recent vulnerabilities recorded for nodejs.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

20.16.0+dfsg-1ubuntu1

This is the first release that contains the fix.

sudo apt-get install --only-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