CVE-2024-22018
A vulnerability has been identified in Node.js, affecting users of the experimental permission model when the --allow-fs-read flag is used. This flaw arises from an inadequate permission model that fails to restrict file stats through the fs.lstat API. As a result, malicious actors can retrieve stats from files that they do not have explicit read access to. This vulnerability affects all users using the experimental permission model in Node.js 20 and Node.js 21. Please note that at the time this CVE was issued, the permission model is an experimental feature of Node.js.
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.
Red Hat, Ubuntu have 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 26.04 | nodejs | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | nodejs | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | nodejs | Fix pending | UBUNTU-CVE-2024-22018 | |
| Ubuntu 22.04 | nodejs | Fix pending | UBUNTU-CVE-2024-22018 | |
| Debian 14 | nodejs | Fixed | 20.15.1+dfsg-1 | DEBIAN-CVE-2024-22018 |
| Debian 13 | nodejs | Fixed | 20.15.1+dfsg-1 | DEBIAN-CVE-2024-22018 |
| Red Hat Enterprise Linux 10 | nodejs20 | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | nodejs | Fixed | 1:20.16.0-1.module+el9.4.0+22197+9e60f127 | RHSA-2024:5815 |
| Red Hat Enterprise Linux 9 | nodejs-devel | Fixed | 1:20.16.0-1.module+el9.4.0+22197+9e60f127 | RHSA-2024:5815 |
| Red Hat Enterprise Linux 9 | nodejs-docs | Fixed | 1:20.16.0-1.module+el9.4.0+22197+9e60f127 | RHSA-2024:5815 |
| Red Hat Enterprise Linux 9 | nodejs-full-i18n | Fixed | 1:20.16.0-1.module+el9.4.0+22197+9e60f127 | RHSA-2024:5815 |
| Red Hat Enterprise Linux 9 | nodejs-nodemon | Fixed | 0:3.0.1-1.module+el9.3.0.z+20478+84a9f781 | RHSA-2024:5815 |
| Red Hat Enterprise Linux 9 | nodejs-packaging | Fixed | 0:2021.06-4.module+el9.3.0+19518+63aad52d | RHSA-2024:5815 |
| Red Hat Enterprise Linux 9 | nodejs-packaging-bundler | Fixed | 0:2021.06-4.module+el9.3.0+19518+63aad52d | RHSA-2024:5815 |
| Red Hat Enterprise Linux 9 | npm | Fixed | 1:10.8.1-1.20.16.0.1.module+el9.4.0+22197+9e60f127 | RHSA-2024:5815 |
| Red Hat Enterprise Linux 8 | nodejs | Fixed | 1:20.16.0-1.module+el8.10.0+22203+a88c8310 | RHSA-2024:5814 |
| Red Hat Enterprise Linux 8 | nodejs-devel | Fixed | 1:20.16.0-1.module+el8.10.0+22203+a88c8310 | RHSA-2024:5814 |
| Red Hat Enterprise Linux 8 | nodejs-docs | Fixed | 1:20.16.0-1.module+el8.10.0+22203+a88c8310 | RHSA-2024:5814 |
| Red Hat Enterprise Linux 8 | nodejs-full-i18n | Fixed | 1:20.16.0-1.module+el8.10.0+22203+a88c8310 | RHSA-2024:5814 |
| 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+20473+c4e3d824 | RHSA-2024:5814 |
| Red Hat Enterprise Linux 8 | nodejs-packaging | Fixed | 0:2021.06-4.module+el8.9.0+19519+e25b965a | RHSA-2024:5814 |
| Red Hat Enterprise Linux 8 | nodejs-packaging-bundler | Fixed | 0:2021.06-4.module+el8.9.0+19519+e25b965a | RHSA-2024:5814 |
| Red Hat Enterprise Linux 8 | npm | Fixed | 1:10.8.1-1.20.16.0.1.module+el8.10.0+22203+a88c8310 | RHSA-2024:5814 |
| 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.16.0-1.module_el9.4.0+107+dbd477e4 | ALSA-2024:5815 |
| AlmaLinux 9 | nodejs-devel | Fixed | 1:20.16.0-1.module_el9.4.0+107+dbd477e4 | ALSA-2024:5815 |
| AlmaLinux 9 | nodejs-docs | Fixed | 1:20.16.0-1.module_el9.4.0+107+dbd477e4 | ALSA-2024:5815 |
| AlmaLinux 9 | nodejs-full-i18n | Fixed | 1:20.16.0-1.module_el9.4.0+107+dbd477e4 | ALSA-2024:5815 |
| AlmaLinux 9 | nodejs-nodemon | Fixed | 3.0.1-1.module_el9.3.0+47+c33bc288 | ALSA-2024:5815 |
| AlmaLinux 9 | nodejs-packaging | Fixed | 2021.06-4.module_el9.3.0+88+29afeaa2 | ALSA-2024:5815 |
| AlmaLinux 9 | nodejs-packaging-bundler | Fixed | 2021.06-4.module_el9.3.0+88+29afeaa2 | ALSA-2024:5815 |
| AlmaLinux 9 | npm | Fixed | 1:10.8.1-1.20.16.0.1.module_el9.4.0+107+dbd477e4 | ALSA-2024:5815 |
| AlmaLinux 8 | nodejs | Fixed | 1:20.16.0-1.module_el8.10.0+3882+e12e42db | ALSA-2024:5814 |
| AlmaLinux 8 | nodejs-devel | Fixed | 1:20.16.0-1.module_el8.10.0+3882+e12e42db | ALSA-2024:5814 |
| AlmaLinux 8 | nodejs-docs | Fixed | 1:20.16.0-1.module_el8.10.0+3882+e12e42db | ALSA-2024:5814 |
| AlmaLinux 8 | nodejs-full-i18n | Fixed | 1:20.16.0-1.module_el8.10.0+3882+e12e42db | ALSA-2024:5814 |
| AlmaLinux 8 | nodejs-nodemon | Fixed | 3.0.1-1.module_el8.9.0+3731+490e3ce5 | ALSA-2024:5814 |
| AlmaLinux 8 | nodejs-packaging | Fixed | 2021.06-4.module_el8.9.0+3775+d8460d35 | ALSA-2024:5814 |
| AlmaLinux 8 | nodejs-packaging-bundler | Fixed | 2021.06-4.module_el8.9.0+3775+d8460d35 | ALSA-2024:5814 |
| AlmaLinux 8 | npm | Fixed | 1:10.8.1-1.20.16.0.1.module_el8.10.0+3882+e12e42db | ALSA-2024:5814 |
| Rocky Linux 9 | nodejs-nodemon | Fixed | 0:3.0.1-1.module+el9.6.0+32322+a8b1fd01 | RLSA-2024:5815 |
| Rocky Linux 9 | nodejs-packaging | Fixed | 0:2021.06-4.module+el9.6.0+32322+a8b1fd01 | RLSA-2024:5815 |
| Rocky Linux 8 | nodejs | Fixed | 1:20.16.0-1.module+el8.10.0+1856+4cdb8df5 | RLSA-2024:5814 |
| Rocky Linux 8 | nodejs-nodemon | Fixed | 0:3.0.1-1.module+el8.10.0+1666+930e28e8 | RLSA-2024:5814 |
| Rocky Linux 8 | nodejs-packaging | Fixed | 0:2021.06-4.module+el8.10.0+1667+4a788d89 | RLSA-2024:5814 |
| Alpine Linux 3.24 | nodejs | Fixed | 20.15.1-r0 | ALPINE-CVE-2024-22018 |
| Alpine Linux 3.23 | nodejs | Fixed | 20.15.1-r0 | ALPINE-CVE-2024-22018 |
| Alpine Linux 3.22 | nodejs | Fixed | 20.15.1-r0 | ALPINE-CVE-2024-22018 |
| Alpine Linux 3.21 | nodejs | Fixed | 20.15.1-r0 | ALPINE-CVE-2024-22018 |
| Alpine Linux 3.20 | nodejs | Fixed | 20.15.1-r0 | ALPINE-CVE-2024-22018 |
| Alpine Linux 3.19 | nodejs | Fixed | 20.15.1-r0 | ALPINE-CVE-2024-22018 |
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
20.15.1,22.4.1
References
- https://hackerone.com/reports/2145862
- http://www.openwall.com/lists/oss-security/2024/07/11/6
- http://www.openwall.com/lists/oss-security/2024/07/19/3
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.