CVEfocus › CVE database › CVE-2019-16777

CVE-2019-16777Arbitrary File Overwrite in npm CLI

CVSS 7.7 HighEPSS 2.0% (higher than 82% of CVEs)Published 2019-12-13Updated 2024-08-05Assigner: GitHub_M

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.

CWE-22

What to do

Fixed builds are available from AlmaLinux, Debian, Red Hat, Rocky Linux, npm: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

14Fixed
2Fix pending
3Under investigation
4Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10npmFix pendingUBUNTU-CVE-2019-16777
Ubuntu 26.04npmUnder investigationUBUNTU-CVE-2019-16777
Ubuntu 25.10npmWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2019-16777
Ubuntu 24.04npmUnder investigationUBUNTU-CVE-2019-16777
Ubuntu 22.04npmUnder investigationUBUNTU-CVE-2019-16777
Ubuntu 20.04npmWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2019-16777
Ubuntu 18.04npmFix pendingUBUNTU-CVE-2019-16777
Ubuntu 16.04npmWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2019-16777
Ubuntu 14.04npmWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2019-16777
Debian 14npmFixed6.13.4+ds-2DEBIAN-CVE-2019-16777
Debian 13npmFixed6.13.4+ds-2DEBIAN-CVE-2019-16777
Debian 12npmFixed6.13.4+ds-2DEBIAN-CVE-2019-16777
Red Hat Enterprise Linux 8nodejsFixed1:12.14.1-1.module+el8.1.0+5466+30f75629RHSA-2020:0579
Red Hat Enterprise Linux 8nodejs-develFixed1:12.14.1-1.module+el8.1.0+5466+30f75629RHSA-2020:0579
Red Hat Enterprise Linux 8nodejs-docsFixed1:10.19.0-1.module+el8.1.0+5726+6ed65f8cRHEA-2020:0330
Red Hat Enterprise Linux 8nodejs-nodemonFixed0:1.18.3-1.module+el8.1.0+3369+37ae6a45RHSA-2020:0579
Red Hat Enterprise Linux 8nodejs-packagingFixed0:17-3.module+el8+2873+aa7dfd9aRHEA-2020:0330
Red Hat Enterprise Linux 8npmFixed1:6.13.4-1.12.14.1.1.module+el8.1.0+5466+30f75629RHSA-2020:0579
AlmaLinux 8nodejs-nodemonFixed1.18.3-1.module_el8.3.0+2023+d2377ea3ALSA-2020:0579
AlmaLinux 8nodejs-packagingFixed17-3.module_el8.3.0+2023+d2377ea3ALSA-2020:0579
Rocky Linux 8nodejs-nodemonFixed0:1.18.3-1.module+el8.3.0+101+f84c7154RLSA-2020:0579
Rocky Linux 8nodejs-packagingFixed0:17-3.module+el8.3.0+101+f84c7154RLSA-2020:0579
npm librarynpmFixed6.13.4GHSA-4328-8hgf-7wjr

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.