# CVE-2019-16776: npm CLI arbitrary file write via bin field symlink

Source: https://junglewise.ai/threats/cve-2019-16776-npm-cli-arbitrary-file-write-via-bin-field-symlink  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2019-12-13. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2019-16776 · Severity: low · CVSS 3.1 · Published 2019-12-13

npm is the package manager widely used by JavaScript developers to install dependencies. Versions prior to 6.13.3 allow malicious packages to create symlinks pointing to arbitrary files on a user's system during installation, potentially enabling attackers to overwrite or access sensitive files. The vulnerability affects only files accessible to the user running npm install, but can be exploited by package publishers to conduct supply-chain attacks.

Technologies: [npm (npm)](https://junglewise.ai/threats/technologies/npm). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2019-16776 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2019-16776 being exploited in the wild.

**How severe is CVE-2019-16776?** Low severity, with a CVSS score of 3.1, published 13 December 2019.

**Which products and versions are affected?** npm (npm) <6.13.3.

**Is there a fix for CVE-2019-16776?** A patch was published on 2019-12-13: npm 6.13.3 released Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2019-16776 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2019-16776?** Check whether you run npm (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

npm CLI versions before 6.13.3 fail to validate symlink targets in the bin field of package.json, allowing packages to create symlinks that point outside the node_modules directory. An attacker can craft a malicious package with a bin entry that symlinks to arbitrary filesystem paths, leading to arbitrary file write or read depending on the target location and user permissions. The attack requires package installation and bypasses the --ignore-scripts flag; however, it does not work through install scripts. The vulnerability was patched in npm 6.13.3. The attack is exploitable via the package manager's normal installation workflow without requiring user interaction beyond running npm install.

## Affected products

- npm npm <6.13.3

## Identifiers

- CVE-2019-16776
- GHSA-x8qc-rrcw-4r46

## Timeline

- 2019-12-13: disclosed
- 2019-12-13: patched: npm 6.13.3 released

## References

- [https://github.com/npm/cli/security/advisories/GHSA-x8qc-rrcw-4r46](https://github.com/npm/cli/security/advisories/GHSA-x8qc-rrcw-4r46)

## Related threats

- [npm cli local privilege escalation via uncontrolled module search path](https://junglewise.ai/threats/cve-2026-0775-npm-cli-local-privilege-escalation-via-uncontrolled-module-search)
- [npm pack root-level ignore file bypass in workspaces](https://junglewise.ai/threats/cve-2022-29244-npm-pack-root-level-ignore-file-bypass-in-workspaces)
- [npm incorrect permission assignment in mkdir](https://junglewise.ai/threats/cve-2018-7408-npm-incorrect-permission-assignment-in-mkdir)
- [npm Arborist symlink following on case-insensitive filesystems](https://junglewise.ai/threats/cve-2021-39134-npm-arborist-symlink-following-on-case-insensitive-filesystems)
- [npm public path traversal via symlink navigation](https://junglewise.ai/threats/npm-public-path-traversal-via-symlink-navigation-dd9ade29)
