Wednesday February 14 2024 Security Releases

By Rafael Gonzaga & Marco Ippolito,

(Update 14-February-2024) Security releases available

Updates are now available for the v18.x, v20.x and v21.x Node.js release lines for the following issues.

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

  • libuv 1.48.0 v21.x (CVE-2024-24806).
  • 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).

OpenSSL Security updates

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

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:

  • This vulnerability affects all users in all active release lines: 18.x, 20.x, and 21.x.

Thank you, to Tobias Nießen for reporting this vulnerability and for fixing it.

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:

  • This vulnerability affects all users in all active release lines: 18.x, 20.x, and 21.x.

Thank you, to Bartek Nowotarski for reporting this vulnerability and thank you Paolo Insogna for fixing it.

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:

  • This vulnerability 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. Thank you, to Tobias Nießen for reporting this vulnerability and for fixing it.

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:

  • This vulnerability affects all users in active release lines: 20.x, and 21.x.

Thank you, to valette for reporting this vulnerability and thank you Tobias Nießen for fixing it.

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:

  • This vulnerability affects all users in all active release lines: 18.x, 20.x, and 21.x.

Thank you, to hkario for reporting this vulnerability and thank you Michael Dawson for fixing it.

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:

  • This vulnerability 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.

Thank you, to xion for reporting this vulnerability and thank you Rafael Gonzaga for fixing it.

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.

Thank you, to Tobias Nießen for reporting this vulnerability and thank you Rafael Gonzaga for fixing it.

(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.

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.

Contact and future updates

The current Node.js security policy can be found at https://nodejs.org/security/. Please follow the process outlined in https://github.com/nodejs/node/security/policy if you wish to report a vulnerability in Node.js.

Subscribe to the low-volume announcement-only nodejs-sec mailing list at https://groups.google.com/forum/#!forum/nodejs-sec to stay up to date on security vulnerabilities and security-related releases of Node.js and the projects maintained in the nodejs GitHub organization.