Bug 2265717 (CVE-2024-21896) - CVE-2024-21896 nodejs: path traversal by monkey-patching buffer internals
Summary: CVE-2024-21896 nodejs: path traversal by monkey-patching buffer internals
Keywords:
Status: NEW
Alias: CVE-2024-21896
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2265718
Blocks: 2264565
TreeView+ depends on / blocked
 
Reported: 2024-02-23 19:16 UTC by Robb Gatica
Modified: 2024-04-11 07:02 UTC (History)
0 users

Fixed In Version: nodejs 20.11.1
Doc Type: ---
Doc Text:
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.
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2024:1695 0 None None None 2024-04-08 12:30:37 UTC
Red Hat Product Errata RHBA-2024:1702 0 None None None 2024-04-08 22:46:23 UTC
Red Hat Product Errata RHBA-2024:1709 0 None None None 2024-04-09 11:15:41 UTC
Red Hat Product Errata RHBA-2024:1710 0 None None None 2024-04-09 11:13:03 UTC
Red Hat Product Errata RHBA-2024:1711 0 None None None 2024-04-09 11:21:49 UTC
Red Hat Product Errata RHBA-2024:1712 0 None None None 2024-04-09 11:25:15 UTC
Red Hat Product Errata RHBA-2024:1745 0 None None None 2024-04-10 01:13:42 UTC
Red Hat Product Errata RHBA-2024:1749 0 None None None 2024-04-10 08:48:58 UTC
Red Hat Product Errata RHBA-2024:1776 0 None None None 2024-04-11 07:02:50 UTC
Red Hat Product Errata RHSA-2024:1687 0 None None None 2024-04-08 09:04:55 UTC
Red Hat Product Errata RHSA-2024:1688 0 None None None 2024-04-08 08:50:00 UTC

Description Robb Gatica 2024-02-23 19:16:43 UTC
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.

Comment 1 Robb Gatica 2024-02-23 19:19:29 UTC
Created nodejs20 tracking bugs for this issue:

Affects: fedora-all [bug 2265718]

Comment 4 errata-xmlrpc 2024-04-08 08:49:59 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2024:1688 https://access.redhat.com/errata/RHSA-2024:1688

Comment 5 errata-xmlrpc 2024-04-08 09:04:54 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2024:1687 https://access.redhat.com/errata/RHSA-2024:1687


Note You need to log in before you can comment on or make changes to this bug.