Inadequate Permission Model in Node.js: Vulnerability in nodejs Package

nodejs Updated 02 Oct 2025

Summary

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

DEBIAN-CVE-2024-22018: A vulnerability has been identified in Node.js, affecting users of the experimental permission model when the --allow-fs-read flag is used. Affects nodejs versions < 20.15.1+dfsg-1. Fixed in 20.15.1+dfsg-1. 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 Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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 nodejs package provides the core functionalities of Node.js, including APIs for file system access, networking, and more. This specific vulnerability affects users who utilize the experimental permission model in Node.js, particularly when the --allow-fs-read flag is enabled, leading to potential unauthorized access to file statistics.

Vulnerability Detail

A vulnerability has been identified in Node.js affecting users of the experimental permission model when the --allow-fs-read flag is used. This flaw arises from an inadequate permission model that fails to restrict file stats through the fs.lstat API. As a result, malicious actors can retrieve stats from files that they do not have explicit read access to. This vulnerability affects all users using the experimental permission model in Node.js versions 20 and 21. It is crucial to note that this permission model is still considered experimental, and thus, the risk of exploitation is heightened.

How To Fix

Minimum fixed version

20.15.1+dfsg-1

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 are advised to avoid using the --allow-fs-read flag while operating under the experimental permission model until the vulnerability is addressed through an update.

Conclusion

In summary, a significant vulnerability exists in the Node.js package affecting users of the experimental permission model. It is crucial for users to update to the patched version to mitigate risks associated with unauthorized file access. Temporary workarounds are available, but the best course of action is to apply the update as soon as possible.

See every vulnerability recorded for nodejs →

Share this vulnerability

FAQ

The vulnerability allows unauthorized access to file statistics through the fs.lstat API when using the experimental permission model with the --allow-fs-read flag.

Node.js versions 20 and 21 are affected by this vulnerability when the experimental permission model is used.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

If you cannot update the package right away, avoid using the --allow-fs-read flag as a temporary workaround.

The experimental permission model has known vulnerabilities, and its use should be approached with caution until it is fully stabilized and secured.

Related vulnerabilities

Recent vulnerabilities recorded for nodejs.

How To Fix

Minimum fixed version

20.15.1+dfsg-1

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