Node.js 14.x < 14.20.1 / 16.x < 16.17.1 / 18.x < 18.9.1 Multiple Vulnerabilities (September 23rd 2022 Security Releases).

critical Nessus Plugin ID 165633

Synopsis

Node.js - JavaScript run-time environment is affected by multiple vulnerabilities.

Description

The version of Node.js installed on the remote host is prior to 14.20.1, 16.17.1, 18.9.1. It is, therefore, affected by multiple vulnerabilities as referenced in the September 23rd 2022 Security Releases advisory.

- The fix for CVE-2022-32212, covered the cases for routable IP addresses, however, there exists a specific behavior on macOS devices when handling the http://0.0.0.0 URL that allows an attacker-controlled DNS server to bypass the DNS rebinding protection by resolving hosts in the .local domain. An attacker- controlled DNS server can, resolve <Computer Name>.local to any arbitrary IP address, and consequently cause the victim's browser to load arbitrary content at http://0.0.0.0. This allows the attacker to bypass the DNS rebinding protection. Thank you, to Zeyu Zhang (@zeyu2001) for reporting this vulnerability and thank you Rafael Gonzaga for fixing it. Impacts: (CVE-2022-32212)

- Due to an incomplete fix for CVE-2022-32215, the llhttp parser in the http module in Node.js v16.16.0 and 18.7.0 still does not correctly handle multi-line Transfer-Encoding headers. This can lead to HTTP Request Smuggling (HRS). Thank you, Liav Gutman of the JFrog CSO Team for reporting this vulnerability and thank you Paolo Insogna for fixing it. Impacts: (CVE-2022-32215)

- The fix for CVE-2022-32213 can be bypassed using an obs-fold, which the Node.js HTTP parser supports. If the Node.js HTTP module is used as a proxy, then it incorrectly parses the transfer-encoding header as indicative of chunked request, while folding the headers and hence forwarding Transfer-Encoding: chunked abc which is not a valid transfer-encoding header to the downstream server. As such this can lead to HTTP request smuggling as indicated by CVE-2022-32213. Thank you, Haxatron for reporting this vulnerability.
Impacts: (CVE-2022-32213)

- The llhttp parser in the http module in Node.js v18.7.0 does not correctly handle header fields that are not terminated with CLRF. This may result in HTTP Request Smuggling. Thank you, VVX7 for reporting this vulnerability. Impacts: (CVE-2022-35256)

- In Node.js 18 and later, at startup, the process attempts to read /home/iojs/build/ws/out/Release/obj.target/deps/openssl/openssl.cnf on MacOS which ordinarily doesn't exist. The attack would be an attacker with access to a shared MacOS host with a self-chosen username (iojs) being able to affect the OpenSSF configuration of other users. Thank you, Michael Dawson for reporting (and fixing!) this vulnerability. Impacts: (CVE-2022-32222)

- Node.js made calls to EntropySource() in SecretKeyGenTraits::DoKeyGen() in src/crypto/crypto_keygen.cc.
However, it does not check the return value, it assumes EntropySource() always succeeds, but it can (and sometimes will) fail. Thank you, Ben Noordhuis for reporting (and fixing!) this vulnerability. Impacts:
(CVE-2022-35255)

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.

Solution

Upgrade to Node.js version 14.20.1 / 16.17.1 / 18.9.1 or later.

See Also

http://www.nessus.org/u?7b6fbe18

Plugin Details

Severity: Critical

ID: 165633

File Name: nodejs_2022_sep.nasl

Version: 1.9

Type: local

Agent: windows, macosx, unix

Family: Misc.

Published: 10/3/2022

Updated: 1/9/2024

Configuration: Enable thorough checks

Supported Sensors: Nessus Agent, Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 6.0

CVSS v2

Risk Factor: High

Base Score: 9.4

Temporal Score: 7.8

Vector: CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:N

CVSS Score Source: CVE-2022-35255

CVSS v3

Risk Factor: Critical

Base Score: 9.1

Temporal Score: 8.4

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Temporal Vector: CVSS:3.0/E:F/RL:O/RC:C

Vulnerability Information

CPE: cpe:/a:nodejs:node.js

Required KB Items: installed_sw/Node.js

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 9/15/2022

Vulnerability Publication Date: 7/8/2022

Reference Information

CVE: CVE-2022-32212, CVE-2022-32213, CVE-2022-32215, CVE-2022-32222, CVE-2022-35255, CVE-2022-35256

IAVB: 2022-B-0036-S