CVE-2024-21896
nodejs: path traversal by monkey-patching buffer internals
Overview
Description
The permission model protects itself against path traversal attacks by calling path.resolve() on any paths given by the user. If the path is to be treated as a Buffer, the implementation uses Buffer.from() to obtain a Buffer from the result of path.resolve(). By monkey-patching Buffer internals, namely, Buffer.prototype.utf8Write, the application can modify the result of path.resolve(), which leads to a path traversal vulnerability.
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.
Source: OX vulnerability database
Severity
9.8 · CRITICAL
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness: CWE-27
Affected packages · 2
Operating systems · 42 fixes
Azure Linux 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 3.0 | nodejs | 0:20.14.0-1.azl3 |
Oracle Linux 2 releases · 4 packages
| Release | Package | Fixed in |
|---|---|---|
| 8 | npm | 1:10.2.4-1.20.11.1.1.module+el8.9.0+90250+089ba5e1 |
| 8 | nodejs +3 | 1:20.11.1-1.module+el8.9.0+90250+089ba5e1 |
| 8 | nodejs-packaging +1 | 2021.06-4.module+el8.9.0+90082+b6a613a6 |
| 8 | nodejs-nodemon | 3.0.1-1.module+el8.9.0+90082+b6a613a6 |
| 9 | npm | 1:10.2.4-1.20.11.1.1.module+el9.3.0+90254+3f4d3ee1 |
| 9 | nodejs +3 | 1:20.11.1-1.module+el9.3.0+90254+3f4d3ee1 |
2 more rows
Photon OS 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 5.0 | nodejs +1 | 20.11.1-1.ph5 |
Red Hat 2 releases · 4 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 8 (nodejs:20) | nodejs-packaging +1 | 0:2021.06-4.module+el8.9.0+19519+e25b965a | RHSA-2024:1687 |
| 8 (nodejs:20) | nodejs-nodemon | 0:3.0.1-1.module+el8.9.0+20473+c4e3d824 | RHSA-2024:1687 |
| 8 (nodejs:20) | npm | 1:10.2.4-1.20.11.1.1.module+el8.9.0+21380+12032667 | RHSA-2024:1687 |
| 8 (nodejs:20) | nodejs +3 | 1:20.11.1-1.module+el8.9.0+21380+12032667 | RHSA-2024:1687 |
| 9 (nodejs:20) | nodejs-packaging +1 | 0:2021.06-4.module+el9.3.0+19518+63aad52d | RHSA-2024:1688 |
| 9 (nodejs:20) | nodejs-nodemon | 0:3.0.1-1.module+el9.3.0.z+20478+84a9f781 | RHSA-2024:1688 |
2 more rows
SUSE Linux Enterprise 1 release · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 15.5 | nodejs20 +3 | 20.11.1-150500.11.6.1 | SUSE-SU-2024:0643-1 |
alma 2 releases · 4 packages
| Release | Package | Fixed in |
|---|---|---|
| 8 (nodejs:20) | npm | 1:10.2.4-1.20.11.1.1.module_el8.9.0+3775+d8460d35 |
| 8 (nodejs:20) | nodejs +3 | 1:20.11.1-1.module_el8.9.0+3775+d8460d35 |
| 8 (nodejs:20) | nodejs-packaging +1 | 2021.06-4.module_el8.9.0+3684+11b9e959 |
| 8 (nodejs:20) | nodejs-nodemon | 3.0.1-1.module_el8.9.0+3731+490e3ce5 |
| 9 (nodejs:20) | npm | 1:10.2.4-1.20.11.1.1.module_el9.3.0+88+29afeaa2 |
| 9 (nodejs:20) | nodejs +3 | 1:20.11.1-1.module_el9.3.0+88+29afeaa2 |
2 more rows
amazon linux 1 release · 3 packages
| Release | Package | Fixed in |
|---|---|---|
| 2023 | nodejs20-npm | 1:10.2.4-1.20.11.1.1.amzn2023.0.1 |
| 2023 | nodejs20 +7 | 1:20.11.1-1.amzn2023.0.1 |
| 2023 | v8-11-3-devel | 3:11.3.244.8-1.20.11.1.1.amzn2023.0.1 |
openSUSE 1 release · 2 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | corepack20 +4 | 20.11.1-1.1 | openSUSE-SU-2024:13697-1 |
| Tumbleweed | corepack21 +4 | 21.6.2-1.1 | openSUSE-SU-2024:13698-1 |
rocky 2 releases · 4 packages
| Release | Package | Fixed in |
|---|---|---|
| 8 (nodejs:20) | npm | 1:10.2.4-1.20.11.1.1.module+el8.9.0+1776+addd4aec |
| 8 (nodejs:20) | nodejs +3 | 1:20.11.1-1.module+el8.9.0+1776+addd4aec |
| 8 (nodejs:20) | nodejs-packaging +1 | 2021.06-4.module+el8.7.0+1072+5b168780 |
| 8 (nodejs:20) | nodejs-nodemon | 3.0.1-1.module+el8.8.0+1459+02651ab6 |
| 9 (nodejs:22) | nodejs-packaging +1 | 2021.06-4.module+el9.6.0+32143+ae966e5b |
| 9 (nodejs:22) | nodejs-packaging +1 | 2021.06-4.module+el9.6.0+32185+bd121a25 |
4 more rows
References
- www.openwall.com http://www.openwall.com/lists/oss-security/2024/03/11/1
- access.redhat.com https://access.redhat.com/errata/RHSA-2024:1687
- access.redhat.com https://access.redhat.com/errata/RHSA-2024:1688
- access.redhat.com https://access.redhat.com/security/cve/CVE-2024-21896
- bugzilla.redhat.com https://bugzilla.redhat.com/2264569
- bugzilla.redhat.com https://bugzilla.redhat.com/2264574
- bugzilla.redhat.com https://bugzilla.redhat.com/2264582
- bugzilla.redhat.com https://bugzilla.redhat.com/2265717
- bugzilla.redhat.com https://bugzilla.redhat.com/2265720
- bugzilla.redhat.com https://bugzilla.redhat.com/2265722
Show all 37 references
- bugzilla.redhat.com https://bugzilla.redhat.com/2265727
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2264569
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2264574
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2264582
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2265717
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2265720
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2265722
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2265727
- creativecommons.org https://creativecommons.org/licenses/by/4.0/
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-46809
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-21890
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-21891
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-21892
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-21896
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-22017
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-22019
- errata.almalinux.org https://errata.almalinux.org/9/ALSA-2024-1688.html
- errata.rockylinux.org https://errata.rockylinux.org/RLSA-2024:1687
- github.com https://github.com/nodejs/node/releases/tag/v20.11.1
- github.com https://github.com/nodejs/node/releases/tag/v21.6.2
- hackerone.com https://hackerone.com/reports/2218653
- linux.oracle.com https://linux.oracle.com/cve/CVE-2024-21896.html
- linux.oracle.com https://linux.oracle.com/errata/ELSA-2024-1688.html
- nodejs.org https://nodejs.org/en/blog/vulnerability/february-2024-security-releases#path-traversal-by-monkey-patching-buffer-internals-cve-2024-21896---high
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2024-21896
- security.netapp.com https://security.netapp.com/advisory/ntap-20240329-0002/
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2024-21896
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.