CVE-2024-21896
nodejs: path traversal by monkey-patching buffer internals
Severity
ImportantRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · February 19, 2024
Updated · June 30, 2026
Description
A flaw was found in Node.js. 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.
Statement
This vulnerability affects users using the experimental permission model in active release lines 20.x and 21.x.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.1 · 7.9CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
CWE-22 · Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')