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.
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
Link | Tags |
---|---|
https://blog.npmjs.org/post/189618601100/binary-planting-with-the-npm-cli | third party advisory |
https://github.com/npm/cli/security/advisories/GHSA-x8qc-rrcw-4r46 | third party advisory |
https://www.oracle.com/security-alerts/cpujan2020.html | third party advisory |
http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00027.html | vendor advisory mailing list third party advisory |
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Z36UKPO5F3PQ3Q2POMF5LEKXWAH5RUFP/ | vendor advisory |
https://access.redhat.com/errata/RHEA-2020:0330 | third party advisory vendor advisory |
https://access.redhat.com/errata/RHSA-2020:0573 | third party advisory vendor advisory |
https://access.redhat.com/errata/RHSA-2020:0579 | third party advisory vendor advisory |
https://access.redhat.com/errata/RHSA-2020:0597 | third party advisory vendor advisory |
https://access.redhat.com/errata/RHSA-2020:0602 | third party advisory vendor advisory |