CVE-2019-16777

Arbitrary File Overwrite in npm CLI

Published Dec 13, 2019 CVSS 3.1 · 7.7 High EPSS 2.0% KEV · Not listed
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.

Analysis

No analysis available yet

Remediation

No remediation available yet

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2019-0774 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.
Github GHSA Github GHSA GHSA-4328-8hgf-7wjr npm Vulnerable to Global node_modules Binary Overwrite
History

No history.

Weaknesses
  • CWE-20

    Improper Input Validation

  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

  • CWE-269

    Improper Privilege Management

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 5, 2024, 1:24 AM
Reserved
Sep 24, 2019, 12:00 AM
Status
Modified
Published
Dec 13, 2019, 1:15 AM
Modified
Jun 17, 2026, 2:22 AM
Severity
Low
Public date
Dec 12, 2019, 12:00 AM