CVE-2024-21896
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.
How to fix CVE-2024-21896
To remediate CVE-2024-21896, upgrade the affected package to a fixed version below.
- —upgrade to 20.12.0 or later
- —upgrade to 20.18.1 or later
Is CVE-2024-21896 being exploited?
Low — EPSS is 1.6%, meaning exploitation activity has not been observed at scale.
Affected packages (2)
- >= 20.0.0, < 20.12.0, >= 21.0.0, < 22.1.0
- >= 20.0.0, < 20.18.1, >= 21.0.0, < 22.12.0
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 3.1 | CRITICAL9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |