Arbitrary File Overwrite in npm CLI (npm cli)

CVE-2019-16777
HIGH 7.7

At a glance

Source
NVD
EPSS
EPSS 2.13 % · percentile 82 ()
State
PUBLISHED
Published
Updated
Assigner
GitHub_M
NVD status
Modified

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.

Weaknesses (CWE)

  • CWE-22 — Improper Limitation of a Pathname to a Restricted Directory
  • CWE-269 — Improper Privilege Management

References

Scores

VersionScoreVectorScored by
CVSS 3.1HIGH 7.7CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:NGitHub_M
CVSS 3.1HIGH 7.7CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:NNVD · security-advisories@github.com (Secondary)
CVSS 3.1MEDIUM 6.5CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:NNVD · nvd@nist.gov (Primary)
CVSS 2.0MEDIUM 5.5AV:N/AC:L/Au:S/C:N/I:P/A:PNVD · nvd@nist.gov (Primary)

Advisories

European references

CERT-FR advisories

Affected configurations (NVD CPE)

Affected products

ProductVersions
npm · cliaffected < 6.13.4 < 6.13.4

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD