CVE-2019-16777

Arbitrary File Overwrite in npm CLI

MEDIUM
6.5
CVSS Score
Published: December 13, 2019 at 01:00 AM UTC
Updated: June 17, 2026 at 02:22 AM UTC
7 products affected across 6 vendorsFedoraEnterprise LinuxLeap

Using cli by npm?

Get instant alerts when new vulnerabilities affect cli - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM6.5
Exploit prediction
EPSS 2%

Description

Versions of the npm CLI prior to 6.13.4 are vulnerable to an 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 previous serve binary. This behavior is still allowed in local installations and also through install scripts. This vulnerability bypasses a user using the --ignore-scripts install option.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 6.13.4
Affected range stops below 6.13.4, so it looks safe — our inference, not a vendor statement
< 6.13.4 ≤ v < 6.13.4< 6.13.4
Affected range stops below 6.13.4, so it looks safe — our inference, not a vendor statement

References (11)

Vendor Advisoryx_refsource_SUSEMailing ListThird Party Advisory
http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00027.html
Vendor Advisoryx_refsource_REDHATThird Party Advisory
https://access.redhat.com/errata/RHEA-2020:0330
Vendor Advisoryx_refsource_REDHATThird Party Advisory
https://access.redhat.com/errata/RHSA-2020:0573
Vendor Advisoryx_refsource_REDHATThird Party Advisory
https://access.redhat.com/errata/RHSA-2020:0579
Vendor Advisoryx_refsource_REDHATThird Party Advisory
https://access.redhat.com/errata/RHSA-2020:0597
Vendor Advisoryx_refsource_REDHATThird Party Advisory
https://access.redhat.com/errata/RHSA-2020:0602

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
HIGH
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-22CWE-269

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card