Cloudanix VulnDB

CVE-2024-21890

Medium · 5.0

CVSS

5.0

EPSS

0.9%

Published

Feb 20, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

Instructions for a security setting in Node.js were unclear, so some setups ended up letting programs reach more files than their owners meant to allow.

Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Data Exposure
Component
Application
Class
Authorization Bypass
Remediation
Upgrade
Effort
Low
Patch risk
Low

What it actually does

Misleading documentation in the experimental Node.js permission model causes wildcard patterns not ending the path (e.g., /home/node/.ssh/*.pub) to be treated as granting access to all files under the parent directory instead of restricting to the intended suffix.

Why it matters to the business

Organizations relying on the permission model for least-privilege file access in Node.js applications may inadvertently expose sensitive directories, increasing the risk of unauthorized data access in development or production workloads that adopt the experimental feature.

How an attack unfolds

An administrator configures file-system permissions using a wildcard pattern based on the unclear documentation; the runtime ignores the wildcard suffix and grants broader read or write access; a local or compromised process then reads or modifies files beyond the intended scope.

How to fix it

Upgrade to a build containing commit 3eccdd1ae61777a381a7ac3bc0ea62443dbb50b8 or later; update documentation examples to place wildcards only as the final character; avoid using the experimental permission model until it exits experimental status if strict file controls are required.

How to confirm the fix worked

Confirm the installed Node.js binary or source contains commit 3eccdd1ae61777a381a7ac3bc0ea62443dbb50b8; test permission grants with both terminating and non-terminating wildcard patterns to verify intended scoping behavior.

Typical attack path

  1. Review Node.js permission model documentation and copy an example wildcard pattern that does not terminate the path.
  2. Apply the pattern via --allow-fs-read or similar flags when starting a Node.js process.
  3. The permission model interprets the pattern as granting access to the entire parent directory.
  4. A process running under those permissions accesses files outside the intended set.

How to detect it

Search process launch logs and container or service startup scripts for --allow-fs-read or --allow-fs-write flags containing wildcard characters that are not the final path element; review permission model configuration files or deployment manifests for similar patterns.

What your security team should do

  • Prioritize upgrade to the fixed commit for any environments using the permission model.
  • Audit existing permission flag configurations for non-terminating wildcards and replace them with explicit paths or correct wildcard usage.
  • Disable the experimental permission model in production until it is stable.
  • Monitor upstream Node.js releases for further permission model changes.

The record

The Node.js Permission Model does not clarify in the documentation that wildcards should be only used as the last character of a file path. For example: ``` --allow-fs-read=/home/node/.ssh/*.pub ``` will ignore `pub` and give access to everything after `.ssh/`. This misleading documentation affects all users using the experimental permission model in Node.js 20 and Node.js 21. Please note that at the time this CVE was issued, the permission model is an experimental feature of Node.js.

Affected packages

Ecosystem Package Introduced Fixed
AlmaLinux:8 nodejs 0 1:20.11.1-1.module_el8.9.0+3775+d8460d35
AlmaLinux:8 nodejs-devel 0 1:20.11.1-1.module_el8.9.0+3775+d8460d35
AlmaLinux:8 nodejs-docs 0 1:20.11.1-1.module_el8.9.0+3775+d8460d35
AlmaLinux:8 nodejs-full-i18n 0 1:20.11.1-1.module_el8.9.0+3775+d8460d35
AlmaLinux:8 nodejs-nodemon 0 3.0.1-1.module_el8.9.0+3731+490e3ce5
AlmaLinux:8 nodejs-packaging 0 2021.06-4.module_el8.9.0+3684+11b9e959
AlmaLinux:8 nodejs-packaging-bundler 0 2021.06-4.module_el8.9.0+3684+11b9e959
AlmaLinux:8 npm 0 1:10.2.4-1.20.11.1.1.module_el8.9.0+3775+d8460d35
AlmaLinux:9 nodejs 0 1:20.11.1-1.module_el9.3.0+88+29afeaa2
AlmaLinux:9 nodejs-devel 0 1:20.11.1-1.module_el9.3.0+88+29afeaa2
AlmaLinux:9 nodejs-docs 0 1:20.11.1-1.module_el9.3.0+88+29afeaa2
AlmaLinux:9 nodejs-full-i18n 0 1:20.11.1-1.module_el9.3.0+88+29afeaa2
AlmaLinux:9 nodejs-nodemon 0 3.0.1-1.module_el9.3.0+47+c33bc288
AlmaLinux:9 nodejs-packaging 0 2021.06-4.module_el9.3.0+48+1cf146a1
AlmaLinux:9 nodejs-packaging-bundler 0 2021.06-4.module_el9.3.0+48+1cf146a1
AlmaLinux:9 npm 0 1:10.2.4-1.20.11.1.1.module_el9.3.0+88+29afeaa2
Bitnami node 20.0.0 20.11.1
Bitnami node 21.0.0 21.6.2
Bitnami node-min 20.0.0 20.11.1
Bitnami node-min 21.0.0 21.6.2
Chainguard nodejs-16 0 16.20.2-r11
Chainguard nodejs-16-doc 0 16.20.2-r11
Chainguard nodejs-18 0 0
Chainguard nodejs-18-doc 0 0
Red Hat:enterprise_linux:8::appstream nodejs 0 1:20.11.1-1.module+el8.9.0+21380+12032667
Red Hat:enterprise_linux:8::appstream nodejs-debuginfo 0 1:20.11.1-1.module+el8.9.0+21380+12032667
Red Hat:enterprise_linux:8::appstream nodejs-debugsource 0 1:20.11.1-1.module+el8.9.0+21380+12032667
Red Hat:enterprise_linux:8::appstream nodejs-devel 0 1:20.11.1-1.module+el8.9.0+21380+12032667
Red Hat:enterprise_linux:8::appstream nodejs-docs 0 1:20.11.1-1.module+el8.9.0+21380+12032667
Red Hat:enterprise_linux:8::appstream nodejs-full-i18n 0 1:20.11.1-1.module+el8.9.0+21380+12032667
Red Hat:enterprise_linux:8::appstream nodejs-nodemon 0 0:3.0.1-1.module+el8.9.0+20473+c4e3d824
Red Hat:enterprise_linux:8::appstream nodejs-packaging 0 0:2021.06-4.module+el8.9.0+19519+e25b965a
Red Hat:enterprise_linux:8::appstream nodejs-packaging-bundler 0 0:2021.06-4.module+el8.9.0+19519+e25b965a
Red Hat:enterprise_linux:8::appstream npm 0 1:10.2.4-1.20.11.1.1.module+el8.9.0+21380+12032667
Red Hat:enterprise_linux:9::appstream nodejs 0 1:20.11.1-1.module+el9.3.0+21385+bac43d5a
Red Hat:enterprise_linux:9::appstream nodejs-debuginfo 0 1:20.11.1-1.module+el9.3.0+21385+bac43d5a
Red Hat:enterprise_linux:9::appstream nodejs-debugsource 0 1:20.11.1-1.module+el9.3.0+21385+bac43d5a
Red Hat:enterprise_linux:9::appstream nodejs-devel 0 1:20.11.1-1.module+el9.3.0+21385+bac43d5a
Red Hat:enterprise_linux:9::appstream nodejs-docs 0 1:20.11.1-1.module+el9.3.0+21385+bac43d5a
Red Hat:enterprise_linux:9::appstream nodejs-full-i18n 0 1:20.11.1-1.module+el9.3.0+21385+bac43d5a
Red Hat:enterprise_linux:9::appstream nodejs-nodemon 0 0:3.0.1-1.module+el9.3.0.z+20478+84a9f781
Red Hat:enterprise_linux:9::appstream nodejs-packaging 0 0:2021.06-4.module+el9.3.0+19518+63aad52d
Red Hat:enterprise_linux:9::appstream nodejs-packaging-bundler 0 0:2021.06-4.module+el9.3.0+19518+63aad52d
Red Hat:enterprise_linux:9::appstream npm 0 1:10.2.4-1.20.11.1.1.module+el9.3.0+21385+bac43d5a
Rocky Linux:8 nodejs 0 1:20.11.1-1.module+el8.9.0+1776+addd4aec
Rocky Linux:8 nodejs-nodemon 0 0:3.0.1-1.module+el8.8.0+1459+02651ab6
Rocky Linux:8 nodejs-packaging 0 0:2021.06-4.module+el8.7.0+1072+5b168780
Rocky Linux:9 nodejs-nodemon 0 0:3.0.1-1.module+el9.2.0+15226+de336927
Rocky Linux:9 nodejs-nodemon 0 0:3.0.1-1.module+el9.6.0+32322+a8b1fd01
Rocky Linux:9 nodejs-packaging 0 0:2021.06-4.module+el9.2.0+15226+de336927
Rocky Linux:9 nodejs-packaging 0 0:2021.06-4.module+el9.5.0+31770+0da7192d
SUSE:Linux Enterprise Module for Web and Scripting 15 SP5 nodejs20 0 20.11.1-150500.11.6.1
Ubuntu:20.04:LTS nodejs 0 No fix
Ubuntu:22.04:LTS nodejs 0 No fix
Ubuntu:24.04:LTS nodejs 0 No fix
Ubuntu:24.10 nodejs 0 No fix
Ubuntu:25.04 nodejs 0 No fix
Ubuntu:25.10 nodejs 0 No fix
Ubuntu:Pro:14.04:LTS nodejs 0 No fix
Ubuntu:Pro:16.04:LTS nodejs 0 No fix
Ubuntu:Pro:18.04:LTS nodejs 0 No fix
Wolfi nodejs-16 0 16.20.2-r11
Wolfi nodejs-16-doc 0 16.20.2-r11
Wolfi nodejs-18 0 0
Wolfi nodejs-18-doc 0 0
openSUSE:Leap 15.5 nodejs20 0 20.11.1-150500.11.6.1
openSUSE:Tumbleweed nodejs20 0 20.11.1-1.1
openSUSE:Tumbleweed nodejs21 0 21.6.2-1.1

Related vulnerabilities