CVE-2019-16777
Arbitrary File Overwrite in npm CLI
Reported by github_m · Published December 13, 2019
npm is fixed in 6.13.4 (npm)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| npm | npm | 6.13.4 |
| npm | Arch Linux | 6.13.4-1 |
| cli | npm | 6.13.4 |
| npm | npmjs | 6.13.4 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| npm | cli | < 6.13.4 |
| chainguard | gitlab-rails-ce-fips-18.1 | * |
| chainguard | gitlab-rails-ce-18.11 | * |
| chainguard | gitlab-rails-ee-fips-17.11 | * |
| arch | npm | 0 |
| chainguard | gitlab-rails-ce-fips-18.9 | * |
| chainguard | gitlab-rails-ce-19.2 | * |
| chainguard | gitlab-rails-ee-fips-17.6 | * |
| chainguard | gitlab-rails-ee-fips-17.4 | * |
| chainguard | gitlab-rails-ce-18.5 | * |
| npm | cli | 0 |
| chainguard | gitlab-rails-ce-19.3 | * |
| chainguard | gitlab-rails-ee-17.7 | * |
| chainguard | gitlab-rails-ce-fips-18.3 | * |
| chainguard | gitlab-rails-ee-17.8 | * |
| chainguard | gitlab-rails-ce-fips-18.8 | * |
| chainguard | gitlab-rails-ce-18.6 | * |
| chainguard | gitlab-rails-ce-fips-19.5 | * |
| chainguard | gitlab-rails-ce-18.7 | * |
| chainguard | code-server | * |
…and 48 more
Timeline
- Dec 12, 2019 CVE Published
- Apr 14, 2021 EPSS Score (30 in total, the first dated here)
- Mar 9, 2026 Security Advisory (10 in total, the first dated here)
- Aug 6, 2026 Distribution Patch (5 in total, the first dated here)
- Sep 13, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2019-16777
vulnetix vdb fixes CVE-2019-16777
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2019-16777/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- x_refsource_MISC
- x_refsource_CONFIRM
- x_refsource_MISC
- openSUSE-SU-2020:0059 vendor-advisoryx_refsource_SUSE
- FEDORA-2020-595ce5e3cc vendor-advisoryx_refsource_FEDORA
- RHEA-2020:0330 vendor-advisoryx_refsource_REDHAT
- RHSA-2020:0573 vendor-advisoryx_refsource_REDHAT
- RHSA-2020:0579 vendor-advisoryx_refsource_REDHAT
- RHSA-2020:0597 vendor-advisoryx_refsource_REDHAT
- RHSA-2020:0602 vendor-advisoryx_refsource_REDHAT
- GLSA-202003-48 vendor-advisoryx_refsource_GENTOO
- https://nvd.nist.gov/vuln/detail/CVE-2019-16777 advisory