Arbitrary File Overwrite

Affecting npm package, versions <6.13.4

Report new vulnerabilities
Do your applications use this vulnerable package? Test your applications

Overview

npm is a package manager for JavaScript.

Affected versions of this package are vulnerable to Arbitrary File Overwrite. It fails to prevent existing globally-installed binaries to be overwritten by other package installations. For example, if a package was installed globally and created a serve binary, any subsequent installs of packages that also create a serve binary would overwrite the first binary. This only affects files in /usr/local/bin.

For npm, this behaviour is still allowed in local installations and also through install scripts. This vulnerability bypasses a user using the --ignore-scripts install option.

Remediation

Upgrade npm to version 6.13.4 or higher.

References

CVSS Score

8.1
high severity
  • Attack Vector
    Network
  • Attack Complexity
    Low
  • Privileges Required
    Low
  • User Interaction
    None
  • Scope
    Unchanged
  • Confidentiality
    High
  • Integrity
    High
  • Availability
    None
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N/E:P/RL:O/RC:C
Credit
Daniel Ruf
CVE
CVE-2019-16777
CWE
CWE-22
Snyk ID
SNYK-JS-NPM-537603
Disclosed
11 Dec, 2019
Published
12 Dec, 2019