Amazon Linux 2023 : nodejs, nodejs-devel, nodejs-full-i18n (ALAS2023-2023-304)

critical Nessus Plugin ID 180113

Synopsis

The remote Amazon Linux 2023 host is missing a security update.

Description

It is, therefore, affected by multiple vulnerabilities as referenced in the ALAS2023-2023-304 advisory.

- The use of `Module._load()` can bypass the policy mechanism and require modules outside of the policy.json definition for a given module. This vulnerability affects all users using the experimental policy mechanism in all active release lines: 16.x, 18.x and, 20.x. Please note that at the time this CVE was issued, the policy is an experimental feature of Node.js. (CVE-2023-32002)

- The use of `module.constructor.createRequire()` can bypass the policy mechanism and require modules outside of the policy.json definition for a given module. This vulnerability affects all users using the experimental policy mechanism in all active release lines: 16.x, 18.x, and, 20.x. Please note that at the time this CVE was issued, the policy is an experimental feature of Node.js. (CVE-2023-32006)

- https://nodejs.org/en/blog/vulnerability/august-2023-security-releases Security releases available Updates are now available for the v16.x, v18.x, and v20.x Node.js release lines for the following issues.
Permissions policies can be bypassed via Module._load (HIGH)(CVE-2023-32002) The use of Module._load() can bypass the policy mechanism and require modules outside of the policy.json definition for a given module.
Please note that at the time this CVE was issued, the policy mechanism is an experimental feature of Node.js. Impacts: This vulnerability affects all users using the experimental policy mechanism in all active release lines: 16.x, 18.x and, 20.x. Thank you, to mattaustin for reporting this vulnerability and thank you Rafael Gonzaga and Bradley Farias for fixing it. Permission model bypass by specifying a path traversal sequence in a Buffer (HIGH)(CVE-2023-32004) A vulnerability has been discovered in Node.js version 20, specifically within the experimental permission model. This flaw relates to improper handling of Buffers in file system APIs causing a traversal path to bypass when verifying file permissions. Please note that at the time this CVE was issued, the permission model is an experimental feature of Node.js.
Impacts: This vulnerability affects all users using the experimental permission model in Node.js 20.
Thank you, to Axel Chong for reporting this vulnerability and thank you Rafael Gonzaga for fixing it.
process.binding() can bypass the permission model through path traversal (HIGH)(CVE-2023-32558) The use of the deprecated API process.binding() can bypass the permission model through path traversal. Please note that at the time this CVE was issued, the permission model is an experimental feature of Node.js.
Impacts: This vulnerability affects all users using the experimental permission model in Node.js 20.
Thank you to Rafael Gonzaga for reporting and fixing this vulnerability. Permissions policies can impersonate other modules in using module.constructor.createRequire() (MEDIUM)(CVE-2023-32006) The use of module.constructor.createRequire() can bypass the policy mechanism and require modules outside of the policy.json definition for a given module. Please note that at the time this CVE was issued, the policy mechanism is an experimental feature of Node.js. Impacts: This vulnerability affects all users using the experimental policy mechanism in all active release lines: 16.x, 18.x and, 20.x. Thank you, to Axel Chong for reporting this vulnerability and thank you Rafael Gonzaga and Bradley Farias for fixing it.
Permissions policies can be bypassed via process.binding (MEDIUM)(CVE-2023-32559) The use of the deprecated API process.binding() can bypass the policy mechanism by requiring internal modules and eventually take advantage of process.binding('spawn_sync') run arbitrary code, outside of the limits defined in a policy.json file. Please note that at the time this CVE was issued, the policy is an experimental feature of Node.js. Impacts This vulnerability affects all users using the experimental policy mechanism in all active release lines: 16.x, 18.x and, 20.x. Thank you, to LeoDog896 for reporting this vulnerability and thank you Tobias Nieen for fixing it. fs.statfs can retrive stats from files restricted by the Permission Model (LOW)(CVE-2023-32005) A vulnerability has been identified in Node.js version 20, affecting users of the experimental permission model when the --allow-fs-read flag is used with a non-* argument. This flaw arises from an inadequate permission model that fails to restrict file stats through the fs.statfs API. As a result, malicious actors can retrieve stats from files that they do not have explicit read access to. Please note that at the time this CVE was issued, the permission model is an experimental feature of Node.js. Impacts: This vulnerability affects all users using the experimental permission model in Node.js 20. Thank you to Rafael Gonzaga for reporting and fixing this vulnerability. fs.mkdtemp() and fs.mkdtempSync() are missing getValidatedPath() checks (LOW)(CVE-2023-32003) fs.mkdtemp() and fs.mkdtempSync() can be used to bypass the permission model check using a path traversal attack. This flaw arises from a missing check in the fs.mkdtemp() API and the impact is a malicious actor could create an arbitrary directory. Please note that at the time this CVE was issued, the permission model is an experimental feature of Node.js. Impacts: This vulnerability affects all users using the experimental permission model in Node.js 20. Thank you, to Axel Chong for reporting this vulnerability and thank you Rafael Gonzaga for fixing it. Downloads and release details Node.js v16.20.2 (LTS) Node.js v18.17.1 (LTS) Node.js v20.5.1 (Current) (Update 08-Aug-2023) Security Release target August 9th The Node.js Security Releases will be available on, or shortly after, Wednesday, August 9th, 2023. Summary The Node.js project will release new versions of the 16.x, 18.x and 20.x releases lines on or shortly after, Tuesday August 8th 2023 in order to address: 3 high severity issues.
2 medium severity issues. 2 low severity issues. OpenSSL Security updates This security release includes the following OpenSSL security updates OpenSSL security advisory 14th July. OpenSSL security advisory 19th July. OpenSSL security advisory 31st July. Impact The 20.x release line of Node.js is vulnerable to 3 high severity issues, 2 medium severity issues, and 2 low severity issues. The 18.x release line of Node.js is vulnerable to 1 high severity issue, and 2 medium severity issues. The 16.x release line of Node.js is vulnerable to 1 high severity issue, and 2 medium severity issues. (CVE-2023-32559)

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

Solution

Run 'dnf update nodejs --releasever 2023.1.20230823' to update your system.

See Also

https://alas.aws.amazon.com/AL2023/ALAS-2023-304.html

https://alas.aws.amazon.com/cve/html/CVE-2023-32002.html

https://alas.aws.amazon.com/cve/html/CVE-2023-32006.html

https://alas.aws.amazon.com/cve/html/CVE-2023-32559.html

https://alas.aws.amazon.com/faqs.html

Plugin Details

Severity: Critical

ID: 180113

File Name: al2023_ALAS2023-2023-304.nasl

Version: 1.4

Type: local

Agent: unix

Published: 8/24/2023

Updated: 9/26/2023

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

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: Critical

Base Score: 10

Temporal Score: 7.8

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

CVSS Score Source: CVE-2023-32002

CVSS v3

Risk Factor: Critical

Base Score: 9.8

Temporal Score: 8.8

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

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

Vulnerability Information

CPE: p-cpe:/a:amazon:linux:nodejs-full-i18n, p-cpe:/a:amazon:linux:nodejs-devel, p-cpe:/a:amazon:linux:nodejs, p-cpe:/a:amazon:linux:nodejs-debuginfo, p-cpe:/a:amazon:linux:nodejs-libs-debuginfo, p-cpe:/a:amazon:linux:v8-devel, p-cpe:/a:amazon:linux:nodejs-docs, p-cpe:/a:amazon:linux:npm, p-cpe:/a:amazon:linux:nodejs-debugsource, p-cpe:/a:amazon:linux:nodejs-libs, cpe:/o:amazon:linux:2023

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

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 8/17/2023

Vulnerability Publication Date: 8/10/2023

Reference Information

CVE: CVE-2023-32002, CVE-2023-32006, CVE-2023-32559