SUSE SLES12 Security Update : nodejs16 (SUSE-SU-2022:3196-1)

critical Nessus Plugin ID 164902

Language:

Synopsis

The remote SUSE host is missing one or more security updates.

Description

The remote SUSE Linux SLES12 / SLES_SAP12 host has packages installed that are affected by multiple vulnerabilities as referenced in the SUSE-SU-2022:3196-1 advisory.

- npm pack ignores root-level .gitignore and .npmignore file exclusion directives when run in a workspace or with a workspace flag (ie. `--workspaces`, `--workspace=<name>`). Anyone who has run `npm pack` or `npm publish` inside a workspace, as of v7.9.0 and v7.13.0 respectively, may be affected and have published files into the npm registry they did not intend to include. Users should upgrade to the latest, patched version of npm v8.11.0, run: npm i -g npm@latest . Node.js versions v16.15.1, v17.19.1, and v18.3.0 include the patched v8.11.0 version of npm. (CVE-2022-29244)

- undici is an HTTP/1.1 client, written from scratch for Node.js. It is possible to inject CRLF sequences into request headers in undici in versions less than 5.7.1. A fix was released in version 5.8.0.
Sanitizing all HTTP headers from untrusted sources to eliminate `\r ` is a workaround for this issue.
(CVE-2022-31150)

- undici is an HTTP/1.1 client, written from scratch for Node.js.`=< [email protected]` users are vulnerable to
_CRLF Injection_ on headers when using unsanitized input as request headers, more specifically, inside the `content-type` header. Example: ``` import { request } from 'undici' const unsanitizedContentTypeInput = 'application/json\r \r GET /foo2 HTTP/1.1' await request('http://localhost:3000, { method: 'GET', headers: { 'content-type': unsanitizedContentTypeInput }, }) ``` The above snippet will perform two requests in a single `request` API call: 1) `http://localhost:3000/` 2) `http://localhost:3000/foo2` This issue was patched in Undici v5.8.1. Sanitize input when sending content-type headers using user input as a workaround. (CVE-2022-35948)

- undici is an HTTP/1.1 client, written from scratch for Node.js.`undici` is vulnerable to SSRF (Server-side Request Forgery) when an application takes in **user input** into the `path/pathname` option of `undici.request`. If a user specifies a URL such as `http://127.0.0.1` or `//127.0.0.1` ```js const undici = require(undici) undici.request({origin: http://example.com, pathname: //127.0.0.1}) ``` Instead of processing the request as `http://example.org//127.0.0.1` (or `http://example.org/http://127.0.0.1` when `http://127.0.0.1 is used`), it actually processes the request as `http://127.0.0.1/` and sends it to `http://127.0.0.1`. If a developer passes in user input into `path` parameter of `undici.request`, it can result in an _SSRF_ as they will assume that the hostname cannot change, when in actual fact it can change because the specified path parameter is combined with the base URL. This issue was fixed in `[email protected]`. The best workaround is to validate user input before passing it to the `undici.request` call. (CVE-2022-35949)

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 affected nodejs16, nodejs16-devel, nodejs16-docs and / or npm16 packages.

See Also

https://bugzilla.suse.com/1200303

https://bugzilla.suse.com/1200517

https://bugzilla.suse.com/1201710

https://bugzilla.suse.com/1202382

https://bugzilla.suse.com/1202383

https://www.suse.com/security/cve/CVE-2022-29244

https://www.suse.com/security/cve/CVE-2022-31150

https://www.suse.com/security/cve/CVE-2022-35948

https://www.suse.com/security/cve/CVE-2022-35949

http://www.nessus.org/u?c14098ac

Plugin Details

Severity: Critical

ID: 164902

File Name: suse_SU-2022-3196-1.nasl

Version: 1.5

Type: local

Agent: unix

Published: 9/9/2022

Updated: 7/14/2023

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

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: Medium

Base Score: 5

Temporal Score: 3.9

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

CVSS Score Source: CVE-2022-29244

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

CVSS Score Source: CVE-2022-35949

Vulnerability Information

CPE: p-cpe:/a:novell:suse_linux:nodejs16, p-cpe:/a:novell:suse_linux:nodejs16-devel, p-cpe:/a:novell:suse_linux:nodejs16-docs, p-cpe:/a:novell:suse_linux:npm16, cpe:/o:novell:suse_linux:12

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

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 9/8/2022

Vulnerability Publication Date: 6/1/2022

Reference Information

CVE: CVE-2022-29244, CVE-2022-31150, CVE-2022-35948, CVE-2022-35949

SuSE: SUSE-SU-2022:3196-1