CVE-2023-39332
Various `node:fs` functions allow specifying paths as either strings or `Uint8Array` objects. In Node.js environments, the `Buffer` class extends the `Uint8Array` class. Node.js prevents path traversal through strings (see CVE-2023-30584) and `Buffer` objects (see CVE-2023-32004), but not through non-`Buffer` `Uint8Array` objects. This is distinct from CVE-2023-32004 which only referred to `Buffer` objects. However, the vulnerability follows the same pattern using `Uint8Array` instead of `Buffer`. 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, Red Hat, Rocky Linux: see the table below for the fixed version per release.
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 16.04 | nodejs | Not affected vulnerable_code_not_present | ||
| Red Hat Enterprise Linux 9 | nodejs | Not affected | ||
| Red Hat Enterprise Linux 9 | nodejs-docs | Not affected | ||
| Red Hat Enterprise Linux 9 | nodejs-full-i18n | Not affected | ||
| Red Hat Enterprise Linux 9 | nodejs-libs | Not affected | ||
| Red Hat Enterprise Linux 9 | npm | Not affected | ||
| Red Hat Enterprise Linux 8 | nodejs | Fixed | 1:20.8.1-1.module+el8.9.0+20473+c4e3d824 | RHSA-2023:7205 |
| Red Hat Enterprise Linux 8 | nodejs-devel | Fixed | 1:20.8.1-1.module+el8.9.0+20473+c4e3d824 | RHSA-2023:7205 |
| Red Hat Enterprise Linux 8 | nodejs-docs | Fixed | 1:20.8.1-1.module+el8.9.0+20473+c4e3d824 | RHSA-2023:7205 |
| Red Hat Enterprise Linux 8 | nodejs-full-i18n | Fixed | 1:20.8.1-1.module+el8.9.0+20473+c4e3d824 | RHSA-2023:7205 |
| 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-2023:7205 |
| Red Hat Enterprise Linux 8 | nodejs-packaging | Fixed | 0:2021.06-4.module+el8.9.0+19519+e25b965a | RHSA-2023:7205 |
| Red Hat Enterprise Linux 8 | nodejs-packaging-bundler | Fixed | 0:2021.06-4.module+el8.9.0+19519+e25b965a | RHSA-2023:7205 |
| Red Hat Enterprise Linux 8 | npm | Fixed | 1:10.1.0-1.20.8.1.1.module+el8.9.0+20473+c4e3d824 | RHSA-2023:7205 |
| Red Hat Enterprise Linux 8 | v8-12.4-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | v8-13.6-devel | Not affected | ||
| AlmaLinux 8 | nodejs | Fixed | 1:20.8.1-1.module_el8.9.0+3675+0258a6d9 | ALSA-2023:7205 |
| AlmaLinux 8 | nodejs-devel | Fixed | 1:20.8.1-1.module_el8.9.0+3675+0258a6d9 | ALSA-2023:7205 |
| AlmaLinux 8 | nodejs-docs | Fixed | 1:20.8.1-1.module_el8.9.0+3675+0258a6d9 | ALSA-2023:7205 |
| AlmaLinux 8 | nodejs-full-i18n | Fixed | 1:20.8.1-1.module_el8.9.0+3675+0258a6d9 | ALSA-2023:7205 |
| AlmaLinux 8 | nodejs-nodemon | Fixed | 3.0.1-1.module_el8.9.0+3675+0258a6d9 | ALSA-2023:7205 |
| AlmaLinux 8 | nodejs-packaging | Fixed | 2021.06-4.module_el8.9.0+3684+11b9e959 | ALSA-2023:7205 |
| AlmaLinux 8 | nodejs-packaging-bundler | Fixed | 2021.06-4.module_el8.9.0+3684+11b9e959 | ALSA-2023:7205 |
| AlmaLinux 8 | npm | Fixed | 1:10.1.0-1.20.8.1.1.module_el8.9.0+3675+0258a6d9 | ALSA-2023:7205 |
| Rocky Linux 8 | nodejs-nodemon | Fixed | 0:3.0.1-1.module+el8.8.0+1459+02651ab6 | RLSA-2023:7205 |
| Rocky Linux 8 | nodejs-packaging | Fixed | 0:2021.06-4.module+el8.7.0+1072+5b168780 | RLSA-2023:7205 |
| Alpine Linux 3.24 | nodejs-current | Fixed | 20.8.1-r0 | ALPINE-CVE-2023-39332 |
| Alpine Linux 3.23 | nodejs-current | Fixed | 20.8.1-r0 | ALPINE-CVE-2023-39332 |
| Alpine Linux 3.22 | nodejs-current | Fixed | 20.8.1-r0 | ALPINE-CVE-2023-39332 |
| Alpine Linux 3.21 | nodejs-current | Fixed | 20.8.1-r0 | ALPINE-CVE-2023-39332 |
| Alpine Linux 3.20 | nodejs-current | Fixed | 20.8.1-r0 | ALPINE-CVE-2023-39332 |
| Alpine Linux 3.19 | nodejs-current | Fixed | 20.8.1-r0 | ALPINE-CVE-2023-39332 |
| Alpine Linux 3.18 | nodejs-current | Fixed | 20.8.1-r0 | ALPINE-CVE-2023-39332 |
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.8.1
References
- https://hackerone.com/reports/2199818
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3N4NJ7FR4X4FPZUGNTQAPSTVB2HB2Y4A/
- https://security.netapp.com/advisory/ntap-20231116-0009/
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.