GHSA-m6cx-g6qm-p2cx

Suggest an improvement
Source
https://github.com/advisories/GHSA-m6cx-g6qm-p2cx
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2019/12/GHSA-m6cx-g6qm-p2cx/GHSA-m6cx-g6qm-p2cx.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-m6cx-g6qm-p2cx
Aliases
Related
Published
2019-12-13T15:39:19Z
Modified
2023-11-08T04:01:21.212469Z
Severity
  • 7.7 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N CVSS Calculator
Summary
Arbitrary File Write in npm
Details

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 create files on a user's system when the package is installed. It is only possible to affect files that the user running npm install has access to and it is not possible to over write files that already exist on disk.

This behavior is still possible through install scripts. This vulnerability bypasses a user using the --ignore-scripts install option.

Recommendation

Upgrade to version 6.13.3 or later.

References

Affected packages

npm / npm

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.13.3