Skip to content
Fencer Vulns
high 7.5

CVE-2024-21892 json

On Linux, Node.js ignores certain environment variables if those may have been set by an unprivileged user while the process is running wit…

published 2024-02-20 2 y ago modified 2026-09-08 2 mo ago also BIT-node-2024-21892 , BIT-node-min-2024-21892 , EUVD-2024-19503

cvss
7.5
version 3.0, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.6%
EPSS 0.6% chance of exploitation in 30 days, percentile 46%
public exploits
0
none known

Summary

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

Patch / fix

  • bitnami node 18.19.1, 20.11.1, 21.6.2
  • bitnami node-min 18.19.1, 20.11.1, 21.6.2
  • NodeJS Node 18.19.1, 20.11.1, 21.6.2
  • nodejs Debian 12 18.20.4+dfsg-1~deb12u1
  • nodejs Debian 14, Debian 13 18.19.1+dfsg-1

debian advisories DEBIAN-CVE-2024-21892

  • npm RHEL 8 1:10.2.4-1.18.19.1.1.module+el8.9.0+21387+21356dec
  • nodejs RHEL 8 1:18.19.1-1.module+el8.9.0+21387+21356dec
  • nodejs-nodemon RHEL 8 3.0.1-1.module+el8.9.0+21190+5ebd2c33
  • nodejs-full-i18n RHEL 8 1:18.19.1-1.module+el8.9.0+21387+21356dec
  • nodejs-packaging RHEL 8 2021.06-4.module+el8.9.0+21190+5ebd2c33
  • nodejs-packaging-bundler RHEL 8 2021.06-4.module+el8.9.0+21190+5ebd2c33
  • npm RHEL 9 1:10.2.4-1.18.19.1.1.module+el9.3.0+21388+22892fb9
  • nodejs RHEL 9 1:18.19.1-1.module+el9.3.0+21388+22892fb9

red hat advisories RHSA-2024:1510RHSA-2024:1503RHSA-2024:1932RHSA-2024:1880RHSA-2024:1687RHSA-2024:1688

  • nodejs18 SLES for SAP 15 SP4, SLES 15 SP4-LTSS, SLE Module for Web and Scripting 15 SP5 +4 more 18.19.1-150400.9.18.2
  • nodejs18 SLE Module for Web and Scripting 12 18.19.1-8.18.1
  • nodejs20 SLE Module for Web and Scripting 15 SP5, openSUSE Leap 15.5 20.11.1-150500.11.6.1

suse advisories SUSE-SU-2024:0730-1SUSE-SU-2024:0644-1SUSE-SU-2024:0643-1

  • nodejs20 openSUSE Tumbleweed 20.11.1-1.1
  • nodejs21 openSUSE Tumbleweed 21.6.2-1.1

opensuse advisories openSUSE-SU-2024:13697-1openSUSE-SU-2024:13698-1

  • npm AlmaLinux 8 1:10.2.4-1.20.11.1.1.module_el8.9.0+3775+d8460d35
  • nodejs AlmaLinux 8 1:20.11.1-1.module_el8.9.0+3775+d8460d35
  • nodejs-nodemon AlmaLinux 8 3.0.1-1.module_el8.9.0+3731+490e3ce5
  • nodejs-full-i18n AlmaLinux 8 1:20.11.1-1.module_el8.9.0+3775+d8460d35
  • nodejs-packaging AlmaLinux 8 2021.06-4.module_el8.9.0+3684+11b9e959
  • nodejs-packaging-bundler AlmaLinux 8 2021.06-4.module_el8.9.0+3684+11b9e959
  • npm AlmaLinux 9 1:10.2.4-1.20.11.1.1.module_el9.3.0+88+29afeaa2
  • nodejs AlmaLinux 9 1:20.11.1-1.module_el9.3.0+88+29afeaa2

almalinux advisories ALSA-2024:1687ALSA-2024:1688ALSA-2024:1510ALSA-2024:1503

  • nodejs-nodemon Rocky Linux 9 3.0.1-1.module+el9.6.0+32322+a8b1fd01
  • nodejs-nodemon Rocky Linux 9 3.0.1-1.module+el9.5.0+31770+0da7192d
  • nodejs-nodemon Rocky Linux 9 3.0.1-1.module+el9.6.0+32045+2e5d342d
  • nodejs-nodemon Rocky Linux 9 3.0.1-1.module+el9.6.0+32143+ae966e5b
  • nodejs-nodemon Rocky Linux 9 3.0.1-1.module+el9.6.0+32144+1d29a396
  • nodejs-nodemon Rocky Linux 9 3.0.1-1.module+el9.6.0+32185+bd121a25
  • nodejs-packaging Rocky Linux 9 2021.06-4.module+el9.5.0+31770+0da7192d
  • nodejs-packaging Rocky Linux 9 2021.06-4.module+el9.6.0+32045+2e5d342d

rocky linux advisories RLSA-2024:1688RLSA-2024:1687RLSA-2024:1503RLSA-2024:1510

  • openjdk17 Alpine 3.24, Alpine 3.23, Alpine 3.22 +5 more 17.0.11_p9-r0
  • openjdk21 Alpine 3.24, Alpine 3.23, Alpine 3.22 +3 more 21.0.3_p9-r0

alpine advisories ALPINE-CVE-2024-21892

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • nodejs18 CBL-Mariner 2.0 18.20.2-1
  • nodejs Azure Linux 3.0 20.14.0-1

azure linux advisories AZL-34460AZL-35052

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2024-21892 updated cvss 8.1

nodejs: code injection and privilege escalation through Linux capabilities

  • Red Hat Enterprise Linux AppStream (v. 8) nodejs 18.19.1-1.module+el8.9.0+21387+21356dec, nodejs 20.11.1-1.module+el8.9.0+21380+12032667, nodejs-nodemon 3.0.1-1.module+el8.9.0+20473+c4e3d824, nodejs-nodemon 3.0.1-1.module+el8.9.0+21190+5ebd2c33, npm 10.2.4-1.18.19.1.1.module+el8.9.0+21387+21356dec, npm 10.2.4-1.20.11.1.1.module+el8.9.0+21380+12032667, +6 more
    fixed: vendor fix RHSA-2024:1510
  • Red Hat Enterprise Linux AppStream (v. 9) nodejs 18.19.1-1.module+el9.3.0+21388+22892fb9, nodejs 20.11.1-1.module+el9.3.0+21385+bac43d5a, nodejs-nodemon 3.0.1-1.module+el9.3.0+19762+d716bf3b, npm 10.2.4-1.18.19.1.1.module+el9.3.0+21388+22892fb9, npm 10.2.4-1.20.11.1.1.module+el9.3.0+21385+bac43d5a, nodejs-nodemon 3.0.1-1.module+el9.3.0.z+20478+84a9f781, +6 more
    fixed: vendor fix RHSA-2024:1503
  • Red Hat Enterprise Linux AppStream EUS (v.8.8) nodejs 18.19.1-1.module+el8.8.0+21592+14a8b93e, nodejs-nodemon 3.0.1-1.module+el8.8.0+19757+8ca87034, npm 10.2.4-1.18.19.1.1.module+el8.8.0+21592+14a8b93e, nodejs-full-i18n 18.19.1-1.module+el8.8.0+21592+14a8b93e, nodejs-packaging 2021.06-4.module+el8.7.0+15582+19c314fa, nodejs-packaging-bundler 2021.06-4.module+el8.7.0+15582+19c314fa
    fixed: vendor fix RHSA-2024:1880
  • Red Hat Enterprise Linux AppStream EUS (v.9.2) nodejs 18.19.1-1.module+el9.2.0+21594+a052107e, npm 10.2.4-1.18.19.1.1.module+el9.2.0+21594+a052107e, nodejs-nodemon 3.0.1-1.module+el9.2.0.z+19753+58118bc0, nodejs-full-i18n 18.19.1-1.module+el9.2.0+21594+a052107e, nodejs-packaging 2021.06-4.module+el9.1.0+15718+e52ec601, nodejs-packaging-bundler 2021.06-4.module+el9.1.0+15718+e52ec601
    fixed: vendor fix RHSA-2024:1932
  • Red Hat Enterprise Linux 8 npm, nodejs, nodejs-libs, nodejs-nodemon, nodejs-full-i18n, nodejs-packaging, +1 more Red Hat Enterprise Linux 9 npm, nodejs, nodejs-libs, nodejs-full-i18n
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
total
Assessed
2 y ago

Exploit prediction

0.56% chance of exploitation in the next 30 days, higher than 46% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.0 7.5 CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:N
NVD 3.1 7.8 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
OSV 3.1 7.8 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
bitnami node
<18.19.1
>=19.0.0, <20.11.1
>=21.0.0, <21.6.2
18.19.1
20.11.1
21.6.2
bitnami node-min
<18.19.1
>=19.0.0, <20.11.1
>=21.0.0, <21.6.2
18.19.1
20.11.1
21.6.2

Affected products

  • NodeJS Node
  • nodejs node.js

Classification

Weakness
  • CWE-269 Improper Privilege Management
  • CWE-94 Improper Control of Generation of Code
Technology feeds

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.