Upstream information

CVE-2021-39134 at MITRE

Description

`@npmcli/arborist`, the library that calculates dependency trees and manages the `node_modules` folder hierarchy for the npm command line interface, aims to guarantee that package dependency contracts will be met, and the extraction of package contents will always be performed into the expected folder. This is, in part, accomplished by resolving dependency specifiers defined in `package.json` manifests for dependencies with a specific name, and nesting folders to resolve conflicting dependencies. When multiple dependencies differ only in the case of their name, Arborist's internal data structure saw them as separate items that could coexist within the same level in the `node_modules` hierarchy. However, on case-insensitive file systems (such as macOS and Windows), this is not the case. Combined with a symlink dependency such as `file:/some/path`, this allowed an attacker to create a situation in which arbitrary contents could be written to any location on the filesystem. For example, a package `pwn-a` could define a dependency in their `package.json` file such as `"foo": "file:/some/path"`. Another package, `pwn-b` could define a dependency such as `FOO: "file:foo.tgz"`. On case-insensitive file systems, if `pwn-a` was installed, and then `pwn-b` was installed afterwards, the contents of `foo.tgz` would be written to `/some/path`, and any existing contents of `/some/path` would be removed. Anyone using npm v7.20.6 or earlier on a case-insensitive filesystem is potentially affected. This is patched in @npmcli/arborist 2.8.2 which is included in npm v7.20.7 and above.

SUSE information

Overall state of this security issue: Analysis

This issue is currently rated as having important severity.

CVSS v3 Scores
  National Vulnerability Database SUSE
Base Score 8.2 8.1
Vector CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
Access Vector Local Network
Access Complexity Low Low
Privileges Required None None
User Interaction Required Required
Scope Changed Unchanged
Confidentiality Impact High None
Integrity Impact High High
Availability Impact None High
CVSSv3 Version 3.1 3.1
SUSE Bugzilla entry: 1190054 [NEW]

SUSE Security Advisories:

List of released packages

Product(s) Fixed package version(s) References
SUSE Linux Enterprise Module for Web Scripting 12
  • nodejs14 >= 14.18.1-6.18.2
  • nodejs14-devel >= 14.18.1-6.18.2
  • nodejs14-docs >= 14.18.1-6.18.2
  • npm14 >= 14.18.1-6.18.2
Patchnames:
SUSE-SLE-Module-Web-Scripting-12-2021-3886

List of packages in QA

Product(s) Package(s)
SUSE Linux Enterprise Module for Web Scripting 15 SP2
  • nodejs12 >= 12.22.7-4.22.1
  • nodejs12-devel >= 12.22.7-4.22.1
  • nodejs12-docs >= 12.22.7-4.22.1
  • nodejs14 >= 14.18.1-15.21.2
  • nodejs14-devel >= 14.18.1-15.21.2
  • nodejs14-docs >= 14.18.1-15.21.2
  • npm12 >= 12.22.7-4.22.1
  • npm14 >= 14.18.1-15.21.2
SUSE Linux Enterprise Module for Web Scripting 15 SP3
  • nodejs12 >= 12.22.7-4.22.1
  • nodejs12-devel >= 12.22.7-4.22.1
  • nodejs12-docs >= 12.22.7-4.22.1
  • nodejs14 >= 14.18.1-15.21.2
  • nodejs14-devel >= 14.18.1-15.21.2
  • nodejs14-docs >= 14.18.1-15.21.2
  • npm12 >= 12.22.7-4.22.1
  • npm14 >= 14.18.1-15.21.2


Status of this issue by product and package

Please note that this evaluation state might be work in progress, incomplete or outdated. Also information for service packs in the LTSS phase is only included for issues meeting the LTSS criteria. If in doubt, feel free to contact us for clarification.

Product(s) Source package State
SUSE CaaS Platform 4.0 nodejs10 Analysis
SUSE CaaS Platform 4.0 nodejs8 Analysis
SUSE Enterprise Storage 6 nodejs10 Analysis
SUSE Enterprise Storage 6 nodejs8 Analysis
SUSE Linux Enterprise High Performance Computing 15 LTSS nodejs10 Analysis
SUSE Linux Enterprise High Performance Computing 15 LTSS nodejs8 Analysis
SUSE Linux Enterprise High Performance Computing 15 SP1 ESPOS nodejs10 Analysis
SUSE Linux Enterprise High Performance Computing 15 SP1 ESPOS nodejs8 Analysis
SUSE Linux Enterprise High Performance Computing 15 SP1 LTSS nodejs10 Analysis
SUSE Linux Enterprise High Performance Computing 15 SP1 LTSS nodejs8 Analysis
SUSE Linux Enterprise Module for Web and Scripting 12 nodejs10 Analysis
SUSE Linux Enterprise Module for Web and Scripting 12 nodejs12 Analysis
SUSE Linux Enterprise Module for Web and Scripting 12 nodejs14 Released
SUSE Linux Enterprise Module for Web and Scripting 12 nodejs4 Analysis
SUSE Linux Enterprise Module for Web and Scripting 12 nodejs6 Analysis
SUSE Linux Enterprise Module for Web and Scripting 15 SP2 nodejs10 Analysis
SUSE Linux Enterprise Module for Web and Scripting 15 SP2 nodejs12 In progress
SUSE Linux Enterprise Module for Web and Scripting 15 SP2 nodejs14 In progress
SUSE Linux Enterprise Module for Web and Scripting 15 SP2 nodejs8 In progress
SUSE Linux Enterprise Module for Web and Scripting 15 SP3 nodejs12 In progress
SUSE Linux Enterprise Module for Web and Scripting 15 SP3 nodejs14 In progress
SUSE Linux Enterprise Server 15 ESPOS nodejs10 Analysis
SUSE Linux Enterprise Server 15 ESPOS nodejs8 Analysis
SUSE Linux Enterprise Server 15 LTSS nodejs10 Analysis
SUSE Linux Enterprise Server 15 LTSS nodejs8 Analysis
SUSE Linux Enterprise Server 15 SP1 LTSS nodejs10 Analysis
SUSE Linux Enterprise Server 15 SP1 LTSS nodejs8 Analysis
SUSE Linux Enterprise Server Business Critical Linux 15 SP1 nodejs10 Analysis
SUSE Linux Enterprise Server Business Critical Linux 15 SP1 nodejs8 Analysis
SUSE Linux Enterprise Server for SAP Applications 15 nodejs10 Analysis
SUSE Linux Enterprise Server for SAP Applications 15 nodejs8 Analysis
SUSE Linux Enterprise Server for SAP Applications 15 SP1 nodejs10 Analysis
SUSE Linux Enterprise Server for SAP Applications 15 SP1 nodejs8 Analysis
SUSE Manager Proxy 4.0 nodejs10 Unsupported
SUSE Manager Proxy 4.0 nodejs8 Unsupported
SUSE Manager Retail Branch Server 4.0 nodejs10 Unsupported
SUSE Manager Retail Branch Server 4.0 nodejs8 Unsupported
SUSE Manager Server 4.0 nodejs10 Unsupported
SUSE Manager Server 4.0 nodejs8 Unsupported
SUSE OpenStack Cloud Crowbar 8 nodejs6 Analysis
SUSE OpenStack Cloud Crowbar 9 nodejs6 Analysis