RHEL 8 : nodejs:20 (RHSA-2024:2778)

high Nessus Plugin ID 195194

Synopsis

The remote Red Hat host is missing one or more security updates for nodejs:20.

Description

The remote Redhat Enterprise Linux 8 host has packages installed that are affected by multiple vulnerabilities as referenced in the RHSA-2024:2778 advisory.

- A vulnerability in Node.js has been identified, allowing for a Denial of Service (DoS) attack through resource exhaustion when using the fetch() function to retrieve content from an untrusted URL. The vulnerability stems from the fact that the fetch() function in Node.js always decodes Brotli, making it possible for an attacker to cause resource exhaustion when fetching content from an untrusted URL. An attacker controlling the URL passed into fetch() can exploit this vulnerability to exhaust memory, potentially leading to process termination, depending on the system configuration. (CVE-2024-22025)

- c-ares is a C library for asynchronous DNS requests. `ares__read_line()` is used to parse local configuration files such as `/etc/resolv.conf`, `/etc/nsswitch.conf`, the `HOSTALIASES` file, and if using a c-ares version prior to 1.27.0, the `/etc/hosts` file. If any of these configuration files has an embedded `NULL` character as the first character in a new line, it can lead to attempting to read memory prior to the start of the given buffer which may result in a crash. This issue is fixed in c-ares 1.27.0.
No known workarounds exist. (CVE-2024-25629)

- The team has identified a critical vulnerability in the http server of the most recent version of Node, where malformed headers can lead to HTTP request smuggling. Specifically, if a space is placed before a content-length header, it is not interpreted correctly, enabling attackers to smuggle in a second request within the body of the first. (CVE-2024-27982)

- An attacker can make the Node.js HTTP/2 server completely unavailable by sending a small amount of HTTP/2 frames packets with a few HTTP/2 frames inside. It is possible to leave some data in nghttp2 memory after reset when headers with HTTP/2 CONTINUATION frame are sent to the server and then a TCP connection is abruptly closed by the client triggering the Http2Session destructor while header frames are still being processed (and stored in memory) causing a race condition. (CVE-2024-27983)

- nghttp2 is an implementation of the Hypertext Transfer Protocol version 2 in C. The nghttp2 library prior to version 1.61.0 keeps reading the unbounded number of HTTP/2 CONTINUATION frames even after a stream is reset to keep HPACK context in sync. This causes excessive CPU usage to decode HPACK stream. nghttp2 v1.61.0 mitigates this vulnerability by limiting the number of CONTINUATION frames it accepts per stream.
There is no workaround for this vulnerability. (CVE-2024-28182)

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

Solution

Update the RHEL nodejs:20 package based on the guidance in RHSA-2024:2778.

See Also

https://access.redhat.com/errata/RHSA-2024:2778

https://access.redhat.com/security/cve/CVE-2024-22025

https://access.redhat.com/security/cve/CVE-2024-25629

https://access.redhat.com/security/cve/CVE-2024-27982

https://access.redhat.com/security/cve/CVE-2024-27983

https://access.redhat.com/security/cve/CVE-2024-28182

Plugin Details

Severity: High

ID: 195194

File Name: redhat-RHSA-2024-2778.nasl

Version: 1.1

Type: local

Agent: unix

Published: 5/9/2024

Updated: 5/10/2024

Supported Sensors: Agentless Assessment, Frictionless Assessment Agent, Frictionless Assessment AWS, Frictionless Assessment Azure, Nessus Agent, Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 5.0

CVSS v2

Risk Factor: Medium

Base Score: 6.4

Temporal Score: 4.7

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

CVSS Score Source: CVE-2024-27982

CVSS v3

Risk Factor: High

Base Score: 8.2

Temporal Score: 7.1

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

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

CVSS Score Source: CVE-2024-27983

Vulnerability Information

CPE: cpe:/o:redhat:enterprise_linux:8, p-cpe:/a:redhat:enterprise_linux:nodejs, p-cpe:/a:redhat:enterprise_linux:nodejs-devel, p-cpe:/a:redhat:enterprise_linux:nodejs-docs, p-cpe:/a:redhat:enterprise_linux:nodejs-full-i18n, p-cpe:/a:redhat:enterprise_linux:nodejs-nodemon, p-cpe:/a:redhat:enterprise_linux:nodejs-packaging, p-cpe:/a:redhat:enterprise_linux:nodejs-packaging-bundler, p-cpe:/a:redhat:enterprise_linux:npm

Required KB Items: Host/local_checks_enabled, Host/RedHat/release, Host/RedHat/rpm-list, Host/cpu

Exploit Ease: No known exploits are available

Patch Publication Date: 5/9/2024

Vulnerability Publication Date: 2/22/2024

Reference Information

CVE: CVE-2024-22025, CVE-2024-25629, CVE-2024-27982, CVE-2024-27983, CVE-2024-28182

CWE: 127, 390, 400, 444

RHSA: 2024:2778