{"id":"CVE-2019-16776","aliases":["CVE-2019-16776","GHSA-x8qc-rrcw-4r46"],"related":[],"kind":"vulnerability","state":"published","title":"Unauthorized File Access in npm CLI before before version 6.13.3","summary":"Versions of the npm CLI prior to 6.13.3 are vulnerable to an Arbitrary File Write. It fails to prevent access to folders outside of the intended node_modules folder through the bin field. A properly constructed entry in the package.json bin field would allow a package publisher to modify and/or gain access to arbitrary files on a user's system when the package is installed. This behavior is still possible through install scripts. This vulnerability bypasses a user using the --ignore-scripts install option.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Versions of the npm CLI prior to 6.13.3 are vulnerable to an Arbitrary File Write. It fails to prevent access to folders outside of the intended node_modules folder through the bin field. A properly constructed entry in the package.json bin field would allow a package publisher to modify and/or gain access to arbitrary files on a user's system when the package is installed. This behavior is still possible through install scripts. This vulnerability bypasses a user using the --ignore-scripts install option.","source":"cvelist"},{"lang":"en","text":"Versions of the npm CLI prior to 6.13.3 are vulnerable to a symlink reference outside of node_modules. It is possible for packages to create symlinks to files outside of the`node_modules` folder through the `bin` field upon installation. A properly constructed entry in the package.json bin field would allow a package publisher to create a symlink pointing to arbitrary files on a user’s system when the package is installed. Only files accessible by the user running the `npm install` are affected.  \n\nThis behavior is still possible through install scripts. This vulnerability bypasses a user using the --ignore-scripts install option.\n\n\n## Recommendation\n\nUpgrade to version 6.13.3 or later.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Las versiones del npm CLI en versiones anteriores a la 6.13.3 son vulnerables a una escritura de archivo arbitraria. No puede evitar el acceso a las carpetas fuera de la carpeta node_modules prevista a través del campo bin. Una entrada construida correctamente en el campo bin de package.json permitiría al editor del paquete modificar y/o acceder a archivos arbitrarios en el sistema de un usuario cuando el paquete esté instalado. Este comportamiento aún es posible mediante scripts de instalación. Esta vulnerabilidad evita que un usuario utilice la opción de instalación --ignore-scripts.","source":"nvd"}],"published":"2019-12-13T00:55:16.000Z","modified":"2026-09-10T03:49:24.820Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N","score":7.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N","score":7.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N","score":7.7,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","score":8.1,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:S/C:P/I:P/A:N","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"type":"custom","introduced":"< 6.13.3","fixed":"6.13.3","status":"affected"}],"vendor":"npm","product":"cli","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"6.13.3"}],"ecosystem":"npm","package":"npm","purl":"pkg:npm/npm","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"6.13.3"}],"vendor":"npmjs","product":"npm","cpe":"cpe:2.3:a:npmjs:npm:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"15.1"}],"vendor":"opensuse","product":"leap","cpe":"cpe:2.3:o:opensuse:leap:15.1:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"19.3.0.2"}],"vendor":"oracle","product":"graalvm","cpe":"cpe:2.3:a:oracle:graalvm:19.3.0.2:*:*:*:enterprise:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"31"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:31:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"8.0"}],"vendor":"redhat","product":"enterprise_linux","cpe":"cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"8.1"}],"vendor":"redhat","product":"enterprise_linux_eus","cpe":"cpe:2.3:o:redhat:enterprise_linux_eus:8.1:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://blog.npmjs.org/post/189618601100/binary-planting-with-the-npm-cli","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/npm/cli/security/advisories/GHSA-x8qc-rrcw-4r46","tags":["third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.oracle.com/security-alerts/cpujan2020.html","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00027.html","tags":["mailing-list","third-party-advisory","vendor-advisory","web","x-refsource-suse","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Z36UKPO5F3PQ3Q2POMF5LEKXWAH5RUFP/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHEA-2020:0330","tags":["third-party-advisory","vendor-advisory","web","x-refsource-redhat","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2020:0573","tags":["third-party-advisory","vendor-advisory","web","x-refsource-redhat","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2020:0579","tags":["third-party-advisory","vendor-advisory","web","x-refsource-redhat","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2020:0597","tags":["third-party-advisory","vendor-advisory","web","x-refsource-redhat","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2020:0602","tags":["third-party-advisory","vendor-advisory","web","x-refsource-redhat","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2019-16776","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-x8qc-rrcw-4r46","tags":["advisory"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/Z36UKPO5F3PQ3Q2POMF5LEKXWAH5RUFP","tags":["web"],"sources":["ghsa"]},{"url":"https://www.npmjs.com/advisories/1436","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2019-16776","url":"https://www.cve.org/CVERecord?id=CVE-2019-16776","licence":"CVE Terms of Use","modified":"2024-08-05T01:24:48.040Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-x8qc-rrcw-4r46","url":"https://github.com/advisories/GHSA-x8qc-rrcw-4r46","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:24.820Z"},{"source":"nvd","name":"NVD","id":"CVE-2019-16776","url":"https://nvd.nist.gov/vuln/detail/CVE-2019-16776","licence":"Public domain","modified":"2026-06-17T02:22:46.737Z"}],"updatedAt":"2026-11-25T22:57:48.765Z","epss":{"score":0.03412,"percentile":0.8919,"date":"2026-12-01T12:00:22.000Z"}}