cve.bz

CVE-2024-21892 nodejs node.js: Code Injection

7.8 highEPSS 0.6%

High (7.8) in nodejs node.js. EPSS 0.6% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
0.6% (unchanged from 0.6% a week ago; 0.6% 30 days ago) estimated probability of exploitation activity in the next 30 days; 48th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2024-03-12. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-94 Improper Control of Generation of Code (Code Injection)
CWE-269 Improper Privilege Management
OWASP Top 10
A05:2025 Injection, A06:2025 Insecure Design
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-21892 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-21892?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-21892?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-21892 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
NodeJS Nodefrom 4.0 before 4.*
NodeJS Nodefrom 5.0 before 5.*
NodeJS Nodefrom 6.0 before 6.*
NodeJS Nodefrom 7.0 before 7.*
NodeJS Nodefrom 8.0 before 8.*
NodeJS Nodefrom 9.0 before 9.*
NodeJS Nodefrom 10.0 before 10.*
NodeJS Nodefrom 11.0 before 11.*
NodeJS Nodefrom 12.0 before 12.*
NodeJS Nodefrom 13.0 before 13.*
NodeJS Nodefrom 14.0 before 14.*
NodeJS Nodefrom 15.0 before 15.*
NodeJS Nodefrom 16.0 before 16.*
NodeJS Nodefrom 17.0 before 17.*
NodeJS Nodefrom 18.0 before 18.19.1
NodeJS Nodefrom 19.0 before 19.*
NodeJS Nodefrom 20.0 before 20.11.1
NodeJS Nodefrom 21.0 before 21.6.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12nodejs18.20.4+dfsg-1~deb12u1DEBIAN-CVE-2024-21892 DSA-5991-1
Debian13, 14nodejs18.19.1+dfsg-1DEBIAN-CVE-2024-21892
Red Hatenterprise_linux:8::appstreamnodejs, nodejs-docs, nodejs-devel and 3 more1:18.19.1-1.module+el8.9.0+21387+21356decRHSA-2024:1510
Red Hatenterprise_linux:8::appstreamnodejs, nodejs-docs, nodejs-devel and 3 more1:20.11.1-1.module+el8.9.0+21380+12032667RHSA-2024:1687
Red Hatenterprise_linux:8::appstreamnodejs-nodemon0:3.0.1-1.module+el8.9.0+20473+c4e3d824RHSA-2024:1687
Red Hatenterprise_linux:8::appstreamnodejs-nodemon0:3.0.1-1.module+el8.9.0+21190+5ebd2c33RHSA-2024:1510
Red Hatenterprise_linux:8::appstreamnodejs-packaging, nodejs-packaging-bundler0:2021.06-4.module+el8.9.0+19519+e25b965aRHSA-2024:1687
Red Hatenterprise_linux:8::appstreamnodejs-packaging, nodejs-packaging-bundler0:2021.06-4.module+el8.9.0+21190+5ebd2c33RHSA-2024:1510
Red Hatenterprise_linux:8::appstreamnpm1:10.2.4-1.18.19.1.1.module+el8.9.0+21387+21356decRHSA-2024:1510
Red Hatenterprise_linux:8::appstreamnpm1:10.2.4-1.20.11.1.1.module+el8.9.0+21380+12032667RHSA-2024:1687
Red Hatenterprise_linux:9::appstreamnodejs, nodejs-docs, nodejs-devel and 3 more1:18.19.1-1.module+el9.3.0+21388+22892fb9RHSA-2024:1503
Red Hatenterprise_linux:9::appstreamnodejs, nodejs-docs, nodejs-devel and 3 more1:20.11.1-1.module+el9.3.0+21385+bac43d5aRHSA-2024:1688
Red Hatenterprise_linux:9::appstreamnodejs-nodemon0:3.0.1-1.module+el9.3.0+19762+d716bf3bRHSA-2024:1503
Red Hatenterprise_linux:9::appstreamnodejs-nodemon0:3.0.1-1.module+el9.3.0.z+20478+84a9f781RHSA-2024:1688
12 more for Red Hat in the JSON and on Red Hat's page.
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise Module for Web and Scripting 15 SP5 and 3 morenodejs1818.19.1-150400.9.18.2SUSE-SU-2024:0730-1
SUSELinux Enterprise Module for Web and Scripting 12nodejs1818.19.1-8.18.1SUSE-SU-2024:0644-1
SUSELinux Enterprise Module for Web and Scripting 15 SP5nodejs2020.11.1-150500.11.6.1SUSE-SU-2024:0643-1
openSUSELeap 15.5nodejs1818.19.1-150400.9.18.2SUSE-SU-2024:0730-1
openSUSELeap 15.5nodejs2020.11.1-150500.11.6.1SUSE-SU-2024:0643-1
openSUSETumbleweednodejs2020.11.1-1.1openSUSE-SU-2024:13697-1
openSUSETumbleweednodejs2121.6.2-1.1openSUSE-SU-2024:13698-1
AlmaLinux8nodejs, nodejs-docs, nodejs-devel and 1 more1:18.19.1-1.module_el8.9.0+3753+4de0891bALSA-2024:1510
AlmaLinux8nodejs, nodejs-docs, nodejs-devel and 1 more1:20.11.1-1.module_el8.9.0+3775+d8460d35ALSA-2024:1687
AlmaLinux8nodejs-nodemon3.0.1-1.module_el8.8.0+3613+1ed8c91dALSA-2024:1510
AlmaLinux8nodejs-nodemon3.0.1-1.module_el8.9.0+3731+490e3ce5ALSA-2024:1687
AlmaLinux8nodejs-packaging, nodejs-packaging-bundler2021.06-4.module_el8.7.0+3343+ea2b7901ALSA-2024:1510
AlmaLinux8nodejs-packaging, nodejs-packaging-bundler2021.06-4.module_el8.9.0+3684+11b9e959ALSA-2024:1687
AlmaLinux8npm1:10.2.4-1.18.19.1.1.module_el8.9.0+3753+4de0891bALSA-2024:1510
AlmaLinux8npm1:10.2.4-1.20.11.1.1.module_el8.9.0+3775+d8460d35ALSA-2024:1687
AlmaLinux9nodejs, nodejs-docs, nodejs-devel and 1 more1:18.19.1-1.module_el9.3.0+59+28b95644ALSA-2024:1503
AlmaLinux9nodejs, nodejs-docs, nodejs-devel and 1 more1:20.11.1-1.module_el9.3.0+88+29afeaa2ALSA-2024:1688
AlmaLinux9nodejs-nodemon3.0.1-1.module_el9.2.0+36+853e48f5ALSA-2024:1503
AlmaLinux9nodejs-nodemon3.0.1-1.module_el9.3.0+47+c33bc288ALSA-2024:1688
4 more for AlmaLinux in the JSON.
Rocky Linux8nodejs1:18.19.1-1.module+el8.9.0+1768+6b454dc0RLSA-2024:1510
Rocky Linux8nodejs1:20.11.1-1.module+el8.9.0+1776+addd4aecRLSA-2024:1687
Rocky Linux8nodejs-nodemon0:3.0.1-1.module+el8.8.0+1459+02651ab6RLSA-2024:1510 RLSA-2024:1687
Rocky Linux8nodejs-packaging0:2021.06-4.module+el8.7.0+1072+5b168780RLSA-2024:1510 RLSA-2024:1687
Rocky Linux9nodejs-nodemon0:3.0.1-1.module+el9.5.0+31770+0da7192dRLSA-2024:1503 RLSA-2024:1688
Rocky Linux9nodejs-nodemon0:3.0.1-1.module+el9.6.0+32045+2e5d342dRLSA-2024:1503 RLSA-2024:1688
Rocky Linux9nodejs-nodemon0:3.0.1-1.module+el9.6.0+32143+ae966e5bRLSA-2024:1503 RLSA-2024:1688
Rocky Linux9nodejs-nodemon0:3.0.1-1.module+el9.6.0+32144+1d29a396RLSA-2024:1503 RLSA-2024:1688
Rocky Linux9nodejs-nodemon0:3.0.1-1.module+el9.6.0+32185+bd121a25RLSA-2024:1503 RLSA-2024:1688
Rocky Linux9nodejs-nodemon0:3.0.1-1.module+el9.6.0+32322+a8b1fd01RLSA-2024:1503 RLSA-2024:1688
Rocky Linux9nodejs-packaging0:2021.06-4.module+el9.5.0+31770+0da7192dRLSA-2024:1503 RLSA-2024:1688
Rocky Linux9nodejs-packaging0:2021.06-4.module+el9.6.0+32045+2e5d342dRLSA-2024:1503 RLSA-2024:1688
5 more for Rocky Linux in the JSON.
Alpinev3.17, v3.18, v3.19 and 5 moreopenjdk1717.0.11_p9-r0ALPINE-CVE-2024-21892
Alpinev3.19, v3.20, v3.21 and 3 moreopenjdk2121.0.3_p9-r0ALPINE-CVE-2024-21892
Azure Linux2nodejs1818.20.2-1AZL-34460
Azure Linux3nodejs20.14.0-1AZL-35052
Alpaquita23nodejs18.19.1-r0BELL-CVE-2024-21892
Alpaquitastreamnodejs20.11.1-r0BELL-CVE-2024-21892
BellSoft Hardened Containers23nodejs18.19.1-r0BELL-CVE-2024-21892
BellSoft Hardened Containersstreamnodejs20.11.1-r0BELL-CVE-2024-21892

From the distributions' data via OSV.dev: the Debian Security Tracker; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Red Hat · SUSE · openSUSE · Alpine · Alpaquita · BellSoft Hardened Containers.

Red Hat

Red Hat rates this Important.

Red Hat's 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.

Red Hat's 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.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8nodejs:18-8090020240301110609.a75119d5Fixed 2024-03-26RHSA-2024:1510
Red Hat Enterprise Linux 8nodejs:20-8090020240228165436.a75119d5Fixed 2024-04-08RHSA-2024:1687
Red Hat Enterprise Linux 8.8 Extended Update Supportnodejs:18-8080020240322102042.63b34585Fixed 2024-04-18RHSA-2024:1880
Red Hat Enterprise Linux 9nodejs:18-9030020240301111035.rhel9Fixed 2024-03-25RHSA-2024:1503
Red Hat Enterprise Linux 9nodejs:20-9030020240229115828.rhel9Fixed 2024-04-08RHSA-2024:1688
Red Hat Enterprise Linux 9.2 Extended Update Supportnodejs:18-9020020240322155241.rhel9Fixed 2024-04-22RHSA-2024:1932
Red Hat Enterprise Linux 8nodejs:16/nodejsNot affected
Red Hat Enterprise Linux 9nodejsNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-21892.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-24-319-08Siemens SINEC INS2024-11-12MultipleSINEC INSnone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

Attack patterns (CAPEC)

  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-77 Manipulating User-Controlled Variables Likelihood: High · Severity: Very High
  • CAPEC-242 Code Injection Likelihood: High · Severity: High
  • CAPEC-58 Restful Privilege Elevation Likelihood: High · Severity: High
  • CAPEC-122 Privilege Abuse Likelihood: High · Severity: Medium
  • CAPEC-233 Privilege Escalation

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON