CVE Database›Document archive›CVE-2024-21892

CVE-2024-21892

nodejs: code injection and privilege escalation through Linux capabilities

Loading…

Severity

Important

Red Hat Product Security

8.1

CVSS 3.1

Review impact separately from score.

Published · February 16, 2024

Updated · November 21, 2025

Description

A flaw was found in Node.js. On Linux, Node.js ignores certain environment variables if an unprivileged user has set them while the process is running with elevated privileges, except for CAP_NET_BIND_SERVICE. Due to a bug in the implementation of this exception, Node.js incorrectly applies this exception even when other capabilities have been set. This flaw allows unprivileged users to inject code that inherits the process's elevated privileges.

Statement

This vulnerability is classified as an Important severity rather than Critical due to several factors. While it allows unprivileged users to inject code and potentially escalate privileges in a process running with elevated privileges, it does so under specific conditions and limitations. The vulnerability only affects Linux systems where Node.js is running with elevated privileges, and it relies on a specific bug in handling environment variables set by unprivileged users. Additionally, the impact is constrained to the Node.js environment and does not directly compromise the underlying operating system.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

CVSS / CWE

CVSS 3.1 · 8.1
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N

CWE-94 · Improper Control of Generation of Code ('Code Injection')