CVE-2024-21896

nodejs: path traversal by monkey-patching buffer internals

Published Feb 20, 2024 CVSS 3.1 · 9.8 Critical EPSS 1.3% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2024-19507 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.
History
Type Values Removed Values Added
Metrics epss

{'score': 0.00558}

epss

{'score': 0.00778}

Type Values Removed Values Added
First Time appeared Nodejs nodejs
CPEs cpe:2.3:a:nodejs:nodejs:*:*:*:*:*:*:*:*
Vendors & Products Nodejs nodejs
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Nodejs
Nodejs node.js
CPEs cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:*
Vendors & Products Nodejs
Nodejs node.js
Metrics cvssV3_1

{'score': 7.9, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N'}

cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
Weaknesses CWE-27
Weaknesses

Sources

Status
PUBLISHED
Assigner
hackerone
Published
Updated
Apr 30, 2025, 10:25 PM
Reserved
Jan 3, 2024, 1:04 AM
Status
Analyzed
Published
Feb 20, 2024, 2:15 AM
Modified
Jun 17, 2026, 7:10 AM
Severity
Important
Public date
Feb 19, 2024, 12:00 AM