CVE-2024-21892
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.
What to do
Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 24.04 | nodejs | Not affected vulnerable_code_not_present | ||
| Ubuntu 16.04 | nodejs | Fix pending | ||
| Debian 14 | nodejs | Fixed | 18.19.1+dfsg-1 | DEBIAN-CVE-2024-21892 |
| Debian 13 | nodejs | Fixed | 18.19.1+dfsg-1 | DEBIAN-CVE-2024-21892 |
| Debian 12 | nodejs | Fixed | 18.20.4+dfsg-1~deb12u1 | DEBIAN-CVE-2024-21892 |
| Red Hat Enterprise Linux 9 | nodejs | Fixed | 1:18.19.1-1.module+el9.3.0+21388+22892fb9 | RHSA-2024:1688 |
| Red Hat Enterprise Linux 9 | nodejs-devel | Fixed | 1:20.11.1-1.module+el9.3.0+21385+bac43d5a | RHSA-2024:1503 |
| Red Hat Enterprise Linux 9 | nodejs-docs | Fixed | 1:20.11.1-1.module+el9.3.0+21385+bac43d5a | RHSA-2024:1503 |
| Red Hat Enterprise Linux 9 | nodejs-full-i18n | Fixed | 1:20.11.1-1.module+el9.3.0+21385+bac43d5a | RHSA-2024:1503 |
| Red Hat Enterprise Linux 9 | nodejs-libs | Not affected | ||
| Red Hat Enterprise Linux 9 | nodejs-nodemon | Fixed | 0:3.0.1-1.module+el9.3.0.z+20478+84a9f781 | RHSA-2024:1503 |
| Red Hat Enterprise Linux 9 | nodejs-packaging | Fixed | 0:2021.06-4.module+el9.1.0+15718+e52ec601 | RHSA-2024:1688 |
| Red Hat Enterprise Linux 9 | nodejs-packaging-bundler | Fixed | 0:2021.06-4.module+el9.3.0+19518+63aad52d | RHSA-2024:1503 |
| Red Hat Enterprise Linux 9 | npm | Fixed | 1:10.2.4-1.20.11.1.1.module+el9.3.0+21385+bac43d5a | RHSA-2024:1503 |
| Red Hat Enterprise Linux 8 | nodejs | Fixed | 1:20.11.1-1.module+el8.9.0+21380+12032667 | RHSA-2024:1510 |
| Red Hat Enterprise Linux 8 | nodejs-devel | Fixed | 1:18.19.1-1.module+el8.9.0+21387+21356dec | RHSA-2024:1687 |
| Red Hat Enterprise Linux 8 | nodejs-docs | Fixed | 1:20.11.1-1.module+el8.9.0+21380+12032667 | RHSA-2024:1510 |
| Red Hat Enterprise Linux 8 | nodejs-full-i18n | Fixed | 1:18.19.1-1.module+el8.9.0+21387+21356dec | RHSA-2024:1687 |
| Red Hat Enterprise Linux 8 | nodejs-libs | Not affected | ||
| Red Hat Enterprise Linux 8 | nodejs-nodemon | Fixed | 0:3.0.1-1.module+el8.9.0+21190+5ebd2c33 | RHSA-2024:1687 |
| Red Hat Enterprise Linux 8 | nodejs-packaging | Fixed | 0:2021.06-4.module+el8.9.0+19519+e25b965a | RHSA-2024:1510 |
| Red Hat Enterprise Linux 8 | nodejs-packaging-bundler | Fixed | 0:2021.06-4.module+el8.9.0+21190+5ebd2c33 | RHSA-2024:1687 |
| Red Hat Enterprise Linux 8 | npm | Fixed | 1:10.2.4-1.18.19.1.1.module+el8.9.0+21387+21356dec | RHSA-2024:1687 |
| Red Hat Enterprise Linux 8 | v8-12.4-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | v8-13.6-devel | Not affected | ||
| AlmaLinux 9 | nodejs | Fixed | 1:20.11.1-1.module_el9.3.0+88+29afeaa2 | ALSA-2024:1503 |
| AlmaLinux 9 | nodejs-devel | Fixed | 1:20.11.1-1.module_el9.3.0+88+29afeaa2 | ALSA-2024:1503 |
| AlmaLinux 9 | nodejs-docs | Fixed | 1:20.11.1-1.module_el9.3.0+88+29afeaa2 | ALSA-2024:1503 |
| AlmaLinux 9 | nodejs-full-i18n | Fixed | 1:18.19.1-1.module_el9.3.0+59+28b95644 | ALSA-2024:1688 |
| AlmaLinux 9 | nodejs-nodemon | Fixed | 3.0.1-1.module_el9.3.0+47+c33bc288 | ALSA-2024:1503 |
| AlmaLinux 9 | nodejs-packaging | Fixed | 2021.06-4.module_el9.1.0+13+d9a595ea | ALSA-2024:1688 |
| AlmaLinux 9 | nodejs-packaging-bundler | Fixed | 2021.06-4.module_el9.3.0+48+1cf146a1 | ALSA-2024:1503 |
| AlmaLinux 9 | npm | Fixed | 1:10.2.4-1.20.11.1.1.module_el9.3.0+88+29afeaa2 | ALSA-2024:1503 |
| AlmaLinux 8 | nodejs | Fixed | 1:18.19.1-1.module_el8.9.0+3753+4de0891b | ALSA-2024:1687 |
| AlmaLinux 8 | nodejs-devel | Fixed | 1:20.11.1-1.module_el8.9.0+3775+d8460d35 | ALSA-2024:1510 |
| AlmaLinux 8 | nodejs-docs | Fixed | 1:20.11.1-1.module_el8.9.0+3775+d8460d35 | ALSA-2024:1510 |
| AlmaLinux 8 | nodejs-full-i18n | Fixed | 1:18.19.1-1.module_el8.9.0+3753+4de0891b | ALSA-2024:1687 |
| AlmaLinux 8 | nodejs-nodemon | Fixed | 3.0.1-1.module_el8.9.0+3731+490e3ce5 | ALSA-2024:1510 |
| AlmaLinux 8 | nodejs-packaging | Fixed | 2021.06-4.module_el8.7.0+3343+ea2b7901 | ALSA-2024:1687 |
| AlmaLinux 8 | nodejs-packaging-bundler | Fixed | 2021.06-4.module_el8.7.0+3343+ea2b7901 | ALSA-2024:1687 |
| AlmaLinux 8 | npm | Fixed | 1:10.2.4-1.18.19.1.1.module_el8.9.0+3753+4de0891b | ALSA-2024:1687 |
| Rocky Linux 9 | nodejs-nodemon | Fixed | 0:3.0.1-1.module+el9.6.0+32185+bd121a25 | RLSA-2024:1688 |
| Rocky Linux 9 | nodejs-packaging | Fixed | 0:2021.06-4.module+el9.6.0+32185+bd121a25 | RLSA-2024:1688 |
| Rocky Linux 8 | nodejs | Fixed | 1:18.19.1-1.module+el8.9.0+1768+6b454dc0 | RLSA-2024:1687 |
| Rocky Linux 8 | nodejs-nodemon | Fixed | 0:3.0.1-1.module+el8.8.0+1459+02651ab6 | RLSA-2024:1687 |
| Rocky Linux 8 | nodejs-packaging | Fixed | 0:2021.06-4.module+el8.7.0+1072+5b168780 | RLSA-2024:1687 |
| Alpine Linux 3.24 | openjdk17 | Fixed | 17.0.11_p9-r0 | ALPINE-CVE-2024-21892 |
| Alpine Linux 3.24 | openjdk21 | Fixed | 21.0.3_p9-r0 | ALPINE-CVE-2024-21892 |
| Alpine Linux 3.23 | openjdk17 | Fixed | 17.0.11_p9-r0 | ALPINE-CVE-2024-21892 |
| Alpine Linux 3.23 | openjdk21 | Fixed | 21.0.3_p9-r0 | ALPINE-CVE-2024-21892 |
| Alpine Linux 3.22 | openjdk17 | Fixed | 17.0.11_p9-r0 | ALPINE-CVE-2024-21892 |
| Alpine Linux 3.22 | openjdk21 | Fixed | 21.0.3_p9-r0 | ALPINE-CVE-2024-21892 |
| Alpine Linux 3.21 | openjdk17 | Fixed | 17.0.11_p9-r0 | ALPINE-CVE-2024-21892 |
| Alpine Linux 3.21 | openjdk21 | Fixed | 21.0.3_p9-r0 | ALPINE-CVE-2024-21892 |
| Alpine Linux 3.20 | openjdk17 | Fixed | 17.0.11_p9-r0 | ALPINE-CVE-2024-21892 |
| Alpine Linux 3.20 | openjdk21 | Fixed | 21.0.3_p9-r0 | ALPINE-CVE-2024-21892 |
| Alpine Linux 3.19 | openjdk17 | Fixed | 17.0.11_p9-r0 | ALPINE-CVE-2024-21892 |
| Alpine Linux 3.19 | openjdk21 | Fixed | 21.0.3_p9-r0 | ALPINE-CVE-2024-21892 |
| Alpine Linux 3.18 | openjdk17 | Fixed | 17.0.11_p9-r0 | ALPINE-CVE-2024-21892 |
| Alpine Linux 3.17 | openjdk17 | Fixed | 17.0.11_p9-r0 | ALPINE-CVE-2024-21892 |
What the vendor says
As published in the CVE record by hackerone, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- NodeJS Node: affected: 4.0 to before 4.*, 5.0 to before 5.*, 6.0 to before 6.*, 7.0 to before 7.*, 8.0 to before 8.*, 9.0 to before 9.*; fixed in
18.19.1,20.11.1,21.6.2
References
- https://hackerone.com/reports/2237545
- https://security.netapp.com/advisory/ntap-20240322-0003/
- http://www.openwall.com/lists/oss-security/2024/03/11/1
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.