Cloudanix VulnDB

CVE-2024-21891

High · 7.9

CVSS

7.9

EPSS

1.2%

Published

Feb 20, 2024

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in an experimental security feature of Node.js could let attackers reach files they were not supposed to access.

Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Moderate
Impact
Privilege Gain
Component
Application
Class
Path Traversal
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The vulnerability permits user code to replace Node.js built-in path normalization utilities used by fs functions, allowing crafted inputs to bypass the experimental permission model's directory restrictions via path traversal sequences.

Why it matters to the business

Applications relying on the experimental permission model may expose files outside explicitly allowed paths, increasing risk of unauthorized data access or modification in Node.js environments.

How an attack unfolds

An attacker supplies input or a module that overwrites the internal path normalization functions, then issues file system operations containing traversal payloads such as '../' sequences to escape the sandboxed directories enforced by the permission model.

How to fix it

Upgrade Node.js to a build containing commit 3eccdd1ae61777a381a7ac3bc0ea62443dbb50b8 or later; avoid enabling the experimental permission model in production until the fix is applied.

How to confirm the fix worked

Confirm the installed Node.js binary or source contains commit 3eccdd1ae61777a381a7ac3bc0ea62443dbb50b8; re-test the permission model with traversal payloads to verify restrictions are enforced.

Typical attack path

  1. Locate a Node.js process running version 20 or 21 with the experimental permission model enabled
  2. Inject or load attacker-controlled code that replaces the built-in path normalization utilities
  3. Trigger a file system operation (read, write, etc.) using a path containing traversal sequences
  4. Bypass permission checks and access files outside the declared allow list

How to detect it

Monitor Node.js application logs and process behavior for unexpected file accesses outside declared permission directories; inspect for dynamic overrides of internal path utilities in loaded modules.

What your security team should do

  • Disable the experimental permission model unless strictly required
  • Apply the fix commit 3eccdd1ae61777a381a7ac3bc0ea62443dbb50b8 across all Node.js 20/21 deployments
  • Review application code for any reliance on the permission model and plan migration to stable alternatives once available

The record

Node.js depends on multiple built-in utility functions to normalize paths provided to node:fs functions, which can be overwitten with user-defined implementations leading to filesystem permission model bypass through path traversal attack. This vulnerability 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
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 20.18.1+dfsg-1ubuntu2
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
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