Monday, July 8, 2024 Security Releases

Rafael Gonzaga

Security releases available

Updates are now available for the 22.x, 20.x, 18.x Node.js release lines for the following issues.

Bypass incomplete fix of CVE-2024-27980 (CVE-2024-36138) - (High)

The CVE-2024-27980 was identified as an incomplete fix for the BatBadBut vulnerability. This vulnerability arises from improper handling of batch files with all possible extensions on Windows via child_process.spawn / child_process.spawnSync. A malicious command line argument can inject arbitrary commands and achieve code execution even if the shell option is not enabled.

This vulnerability affects all users of child_process.spawn and child_process.spawnSync on Windows in all active release lines.

Impact:

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

Thank you, to tianst for reporting this vulnerability and thank you RafaelGSS for fixing it.

Bypass network import restriction via data URL (CVE-2024-22020) - (Medium)

A security flaw in Node.js allows a bypass of network import restrictions.

By embedding non-network imports in data URLs, an attacker can execute arbitrary code, compromising system security.

Verified on various platforms, the vulnerability is mitigated by forbidding data URLs in network imports.

Exploiting this flaw can violate network import security, posing a risk to developers and servers.

Impact:

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

Thank you, to dittyroma for reporting this vulnerability and thank you RafaelGSS for fixing it.

fs.fchown/fchmod bypasses permission model (CVE-2024-36137) - (Low)

A vulnerability has been identified in Node.js, affecting users of the experimental permission model when the --allow-fs-write flag is used.

Node.js Permission Model do not operate on file descriptors, however, operations such as fs.fchown or fs.fchmod can use a "read-only" file descriptor to change the owner and permissions of a file.

This vulnerability affects all users using the experimental permission model in Node.js 20 and Node.js 22.

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

Impact:

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

Thank you, to 4xpl0r3r for reporting this vulnerability and thank you RafaelGSS for fixing it.

fs.lstat bypasses permission model (CVE-2024-22018) - (Low)

A vulnerability has been identified in Node.js, affecting users of the experimental permission model when the --allow-fs-read flag is used. This flaw arises from an inadequate permission model that fails to restrict file stats through the fs.lstat API. As a result, malicious actors can retrieve stats from files that they do not have explicit read access to.

This vulnerability affects all users using the experimental permission model in Node.js 20 and Node.js 22.

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

Impact:

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

Thank you, to haxatron1 for reporting this vulnerability and thank you RafaelGSS for fixing it.

Permission model improperly processes UNC paths (CVE-2024-37372) - (low)

The Permission Model assumes that any path starting with two backslashes \ has a four-character prefix that can be ignored, which is not always true. This subtle bug leads to vulnerable edge cases.

This vulnerability affects Windows users of the Node.js Permission Model in version v22.x and v20.x

Impact:

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

Thank you, to tniessen for reporting this vulnerability and thank you RafaelGSS for fixing it.

Downloads and release details

(Update 04-Jul-2024) Security Release target July 8th

Due to the U.S. National Holiday on July 4th, the Node.js Security Releases will be available on or shortly after Monday, July 8th, 2024.

The release is being postponed to ensure that people have sufficient time to upgrade before the weekend, as releasing patches on a holiday would provide limited time for updates.

(Update 02-Jul-2024) Security Release target July 4th

The Node.js Security Releases will be available on, or shortly after, Thursday, July 4th, 2024.

Summary

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

  • 1 high severity issues.
  • 1 medium severity issues.
  • 3 low severity issues.

Node.js fetch will be upgraded to undici v6.19.2 on Node.js 18.x and Node.js 20.x. Node.js 22.x already includes undici v6.19.2.

Impact

The 22.x release line of Node.js is vulnerable to 1 high severity issues, 1 medium severity issues, 3 low severity issues. The 20.x release line of Node.js is vulnerable to 1 high severity issues, 1 medium severity issues, 3 low severity issues. The 18.x release line of Node.js is vulnerable to 1 high severity issues, 1 medium severity issues.

It's important to note that End-of-Life versions are always affected when a security release occurs. To ensure your system's security, please use an up-to-date version as outlined in our Release Schedule.

Release timing

Releases will be available on, or shortly after, Tuesday, July 2, 2024.

Contact and future updates

The current Node.js security policy can be found at https://nodejs.org/en/security/. Please follow the process outlined in https://github.com/nodejs/node/blob/master/SECURITY.md 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.