CVE-2024-21892
npm vulnerability analysis and mitigation

Overview

CVE-2024-21892 is a high-severity vulnerability discovered in Node.js affecting versions prior to 18.19.1, 20.11.1, and 21.6.2. The vulnerability was disclosed on February 14, 2024, and affects Node.js implementations on Linux systems. The issue stems from Node.js incorrectly handling environment variables when running with elevated privileges, specifically related to the CAPNETBIND_SERVICE capability exception (NodeJS Blog).

Technical details

The vulnerability occurs when Node.js is running on Linux with elevated privileges. While Node.js is designed to ignore certain environment variables that may have been set by unprivileged users when running with elevated privileges, it makes an exception for CAPNETBIND_SERVICE. Due to a bug in the implementation, this exception is incorrectly applied even when certain other capabilities have been set. The vulnerability has received a CVSS v3.1 base score of 7.8 (HIGH) with the vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (NVD).

Impact

When successfully exploited, this vulnerability allows unprivileged users to inject code that inherits the process's elevated privileges. This can lead to privilege escalation, potentially allowing attackers to execute arbitrary code with elevated permissions. The vulnerability affects all users in all active release lines: 18.x, 20.x, and 21.x (OSS Security).

Mitigation and workarounds

The vulnerability has been patched in Node.js versions 18.19.1, 20.11.1, and 21.6.2. Users are strongly advised to upgrade to these versions or later to address the security issue. The fixes were released as part of the February 2024 security updates (NodeJS Blog).

Community reactions

The vulnerability has received significant attention from the security community and has been classified as high severity by multiple organizations. NetApp has issued an advisory (NTAP-20240322-0003) acknowledging the vulnerability's impact on their products and Red Hat has released security updates to address the issue in their Enterprise Linux distributions (NetApp Advisory, Red Hat Advisory).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management