Skip to content

CVE-2024-21896 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.f...

CriticalCVSS 9.8 EPSS 1.3%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: total
Technology
UbuntuDebian

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.

Upgrade path

4 packages: 1 fixed, 1 partially fixed, 1 with no fix yet.

PackageAffectedFixed inStatus
ubuntu/nodejs(Ubuntu 25.10) = 20.18.1+dfsg-1ubuntu2; = 20.19.2+dfsg-1; = 20.19.4+dfsg-1; All versions No fix listed No fix yet
nodejs node >= 4.0; >= 5.0; >= 6.0; >= 7.0 +13 more 20.11.1, 21.6.2 Partially fixed
nodejs node.js >= 20.0.0, < 20.11.1; >= 21.0.0, < 21.6.2 20.11.1, 21.6.2 Fixed
nodejs = 21.6.1 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
nodejs node >= 4.0 No fix listed
nodejs node >= 5.0 No fix listed
nodejs node >= 6.0 No fix listed
nodejs node >= 7.0 No fix listed
nodejs node >= 8.0 No fix listed
nodejs node >= 9.0 No fix listed
nodejs node >= 10.0 No fix listed
nodejs node >= 11.0 No fix listed
nodejs node >= 12.0 No fix listed
nodejs node >= 13.0 No fix listed
nodejs node >= 14.0 No fix listed
nodejs node >= 15.0 No fix listed
nodejs node >= 16.0 No fix listed
nodejs node >= 17.0 No fix listed
nodejs node >= 19.0 No fix listed
nodejs node >= 20.0, < 20.11.1 20.11.1
nodejs node >= 21.0, < 21.6.2 21.6.2
nodejs = 21.6.1 No fix listed
nodejs node.js >= 20.0.0, < 20.11.1 20.11.1
nodejs node.js >= 21.0.0, < 21.6.2 21.6.2
ubuntu/nodejs(Ubuntu:25.10) All versions No fix listed
ubuntu/nodejs(Ubuntu:25.10) = 20.18.1+dfsg-1ubuntu2 No fix listed
ubuntu/nodejs(Ubuntu:25.10) = 20.19.2+dfsg-1 No fix listed
ubuntu/nodejs(Ubuntu:25.10) = 20.19.4+dfsg-1 No fix listed

References