npm: CVE-2021-39134

Related Vulnerabilities: CVE-2021-39134   CVE-2021-39135  

Debian Bug report logs - #993407
npm: CVE-2021-39134

version graph

Reported by: Salvatore Bonaccorso <carnil@debian.org>

Date: Tue, 31 Aug 2021 20:21:02 UTC

Severity: important

Tags: security, upstream

Found in version npm/7.5.2+ds-2

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, carnil@debian.org, team@security.debian.org, Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>:
Bug#993407; Package src:npm. (Tue, 31 Aug 2021 20:21:03 GMT) (full text, mbox, link).


Acknowledgement sent to Salvatore Bonaccorso <carnil@debian.org>:
New Bug report received and forwarded. Copy sent to carnil@debian.org, team@security.debian.org, Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>. (Tue, 31 Aug 2021 20:21:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Salvatore Bonaccorso <carnil@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: npm: CVE-2021-39134
Date: Tue, 31 Aug 2021 22:18:08 +0200
Source: npm
Version: 7.5.2+ds-2
Severity: important
Tags: security upstream
X-Debbugs-Cc: carnil@debian.org, Debian Security Team <team@security.debian.org>

Hi,

The following vulnerability was published for npm.

CVE-2021-39135[0]:
| `@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 accomplished by extracting package
| contents into a project's `node_modules` folder. If the `node_modules`
| folder of the root project or any of its dependencies is somehow
| replaced with a symbolic link, it could allow Arborist to write
| package dependencies to any arbitrary location on the file system.
| Note that symbolic links contained within package artifact contents
| are filtered out, so another means of creating a `node_modules`
| symbolic link would have to be employed. 1. A `preinstall` script
| could replace `node_modules` with a symlink. (This is prevented by
| using `--ignore-scripts`.) 2. An attacker could supply the target with
| a git repository, instructing them to run `npm install --ignore-
| scripts` in the root. This may be successful, because `npm install
| --ignore-scripts` is typically not capable of making changes outside
| of the project directory, so it may be deemed safe. This is patched in
| @npmcli/arborist 2.8.2 which is included in npm v7.20.7 and above. For
| more information including workarounds please see the referenced GHSA-
| gmw6-94gg-2rc2.


If you fix the vulnerability please also make sure to include the
CVE (Common Vulnerabilities & Exposures) id in your changelog entry.

For further information see:

[0] https://security-tracker.debian.org/tracker/CVE-2021-39135
    https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-39135
[1] https://github.com/npm/arborist/security/advisories/GHSA-2h4h-q99f-3fhc

Please adjust the affected versions in the BTS as needed.

Regards,
Salvatore



Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Sep 1 16:20:42 2021; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.