NodeJS v{18.x,20.x,21.x} February Security Updates

                							

                <!--X-Body-Begin-->
<!--X-User-Header-->

oss-sec
mailing list archives
<!--X-User-Header-End-->
<!--X-TopPNI-->

By Date

By Thread

</form>

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
NodeJS v{18.x,20.x,21.x} February Security Updates

<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->

From: suarezmiguelc () icloud com

Date: Mon, 11 Mar 2024 18:39:48 +0100

<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->

<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
This posting is largely based on the NodeJS blog post at
https://nodejs.org/en/blog/vulnerability/february-2024-security-releases
with some edits and extras by me.  Please note that it still uses future
tense to talk about the releases, which should actually have been made
by now.

======
Summary
======

The Node.js project will release new versions of the 18.x, 20.x and,
21.x releases lines on or shortly after, Tuesday February 6 2024 in
order to address:

- 4 high severity issues.
- 4 medium severity issue.
- 1 low severity issue.

======
Impact
======

The 21.x release line of Node.js is vulnerable to 4 high severity
issues, 4 medium severity issues, and 1 low severity issue.

The 20.x release line of Node.js is vulnerable to 4 high severity
issues, 4 medium severity issues, and 1 low severity issue.

In addition, the 18.x release line of Node.js is vulnerable to 2 high
severity issues, 2 medium severity issues, and 1 low severity issue.

======
Release timing
======

Releases will be available on, or shortly after, Tuesday February
6 2024.

This security release includes the following dependency updates to
address public vulnerabilities:

- libuv 1.48.0 v21.x (CVE-2024-24806).
 =&gt; Discussed in this thread on oss-security
 https://www.openwall.com/lists/oss-security/2024/02/08/2

- libuv on v18.x and v20.x has been patched to address CVE-2024-24806.

- undici 5.28.3 on all release lines
 (CVE-2024-24758, GHSA-3787-6prv-h9w3) =&gt;
 https://github.com/nodejs/undici/security/advisories/GHSA-3787-6prv-h9w3

&lt;&lt;&lt;&lt;&lt;&lt;

For undici, it refers to a low severity vulnerability where the
Proxy-Authorization header wasn’t cleared on cross-origin redirects.
Patched on v5.28.3 (The version NodeJS is updating to) and v6.6.1.

No Workarounds.

======
Code injection and privilege escalation through Linux capabilities
(CVE-2024-21892) -  (High)
======

On Linux, Node.js ignores certain environment variables if those may
have been set by an unprivileged user while the process is running with
elevated privileges with the only exception of CAP_NET_BIND_SERVICE.

Due to a bug in the implementation of this exception, Node.js
incorrectly applies this exception even when certain other capabilities
have been set.

This allows unprivileged users to inject code that inherits the
process's elevated privileges.

Impacts:

- All users in all active release lines: 18.x, 20.x, and 21.x.

======
Reading unprocessed HTTP request with unbounded chunk extension allows
DoS attacks (CVE-2024-22019) - (High)
======

A vulnerability in Node.js HTTP servers allows an attacker to send a
specially crafted HTTP request with chunked encoding, leading to
resource exhaustion and denial of service (DoS).

The server reads an unbounded number of bytes from a single connection,
exploiting the lack of limitations on chunk extension bytes.

The issue can cause CPU and network bandwidth exhaustion, bypassing
standard safeguards like timeouts and body size limits.

Impacts:

- All users in all active release lines: 18.x, 20.x, and 21.x.

======
Path traversal by monkey-patching Buffer internals
(CVE-2024-21896) - (High)
======

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.

Impacts:

- All users using the experimental permission model in active release
 lines: 20.x and 21.x.

Please note that at the time this CVE was issued, the permission model
is an experimental feature of Node.js.

======
setuid() does not drop all privileges due to io_uring
(CVE-2024-22017) - (High)
======

setuid() does not affect libuv's internal io_uring operations if
initialized before the call to setuid().

This allows the process to perform privileged operations despite
presumably having dropped such privileges through a call to setuid().

Impacts:

- All users in active release lines: 20.x, and 21.x.

======
Node.js is vulnerable to the Marvin Attack (timing variant of the
Bleichenbacher attack against PKCS#1 v1.5 padding)
(CVE-2023-46809) - (Medium)
======

A vulnerability in the privateDecrypt() API of the crypto library,
allowed a covert timing side-channel during PKCS#1 v1.5 padding error
handling.

The vulnerability revealed significant timing differences in decryption
for valid and invalid ciphertexts.

This poses a serious threat as attackers could remotely exploit the
vulnerability to decrypt captured RSA ciphertexts or forge signatures,
especially in scenarios involving API endpoints processing Json Web
Encryption messages.

Impacts:

- All users in all active release lines: 18.x, 20.x, and 21.x.

======
Multiple permission model bypasses due to improper path traversal
sequence sanitization
(CVE-2024-21891) - (Medium)
======

Node.js depends on multiple built-in utility functions to normalize
paths provided to node:fs functions, which can be overwitten with
user-defined implementations leading to filesystem permission model
bypass through path traversal attack.

Impacts:

- All users using the experimental permission model in active release
 lines: 20.x and 21.x.

Please note that at the time this CVE was issued, the permission model
is an experimental feature of Node.js.

======
Improper handling of wildcards in --allow-fs-read and --allow-fs-write
(CVE-2024-21890) - (Medium)
======

The Node.js Permission Model does not clarify in the documentation that
wildcards should be only used as the last character of a file path.

For example: --allow-fs-read=/home/node/.ssh/*.pub will ignore pub and
give access to everything after .ssh/.

Impacts:

- This misleading documentation affects all users using the experimental
 permission model in active release lines: 20.x and 21.x.

Please note that at the time this CVE was issued, the permission model
is an experimental feature of Node.js.

======
Updates on the release timings
======

(Update 13-February-2024) Security Release target Wednesday 14th

Due to a long pipeline test on this security release, additional time
was required. Therefore, the new target date is Wednesday 14th.

(Update 08-February-2024) Security Release target Tuesday 13th

We have encounted an error in one of our patches, therefore, the release
will take a bit longer than expected and the Node.js Security Releases
should be available on, or shortly after, Tuesday, February 13th, 2024.

(Update 06-February-2024) Security Release target Thursday 8th

Preparing the releases is taking us a bit longer than originally
expected and the Node.js Security Releases will be available on, or
shortly after, Thursday, February 8th, 2024.

======
OpenSSL Security updates
======

This security release includes an OpenSSL update to version 3.0.13+quic1
on all release lines to address advisories:

- OpenSSL security advisory 6th November =&gt;  Excessive time spent in DH
 check / generation with large Q parameter value, CVE-2023-5678.
https://mta.openssl.org/pipermail/openssl-announce/2023-November/000284.html

- OpenSSL security advisory 9th January =&gt; POLY1305 MAC implementation
 corrupts vector registers on PowerPC, CVE-2023-6129.
https://mta.openssl.org/pipermail/openssl-announce/2024-January/000288.html

- OpenSSL security advisory 15th January =&gt; Excessive time spent
 checking invalid TSA public keys, CVE-2023-6237.
https://mta.openssl.org/pipermail/openssl-announce/2024-January/000289.html

- OpenSSL security advisory 25th January =&gt; PKCS12 Decoding crashes,
 CVE-2024-0727.
https://mta.openssl.org/pipermail/openssl-announce/2024-January/000292.html

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->

<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->

By Date

By Thread

Current thread:

NodeJS v{18.x,20.x,21.x} February Security Updates suarezmiguelc (Mar 11)

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->