Bug 1788310 (CVE-2019-16776) - CVE-2019-16776 npm: Arbitrary file write via constructed entry in the package.json bin field
Summary: CVE-2019-16776 npm: Arbitrary file write via constructed entry in the package...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2019-16776
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1788311 1788312 1803123 1803124 1803158 1803159 1803160 1803686 1803687 1805296 1847735
Blocks: 1788313
TreeView+ depends on / blocked
 
Reported: 2020-01-06 22:20 UTC by Pedro Sampaio
Modified: 2020-06-19 03:44 UTC (History)
24 users (show)

Fixed In Version: npm 6.13.3, nodejs 8.17.0, nodejs 10.18.0, nodejs 12.14.0, nodejs 13.4.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-24 15:49:41 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:0611 None None None 2020-02-26 11:52:35 UTC
Red Hat Product Errata RHBA-2020:0612 None None None 2020-02-26 12:02:07 UTC
Red Hat Product Errata RHBA-2020:0618 None None None 2020-02-26 15:00:43 UTC
Red Hat Product Errata RHBA-2020:0626 None None None 2020-02-27 08:31:10 UTC
Red Hat Product Errata RHBA-2020:0636 None None None 2020-02-27 15:53:24 UTC
Red Hat Product Errata RHBA-2020:0646 None None None 2020-03-02 08:04:14 UTC
Red Hat Product Errata RHBA-2020:0647 None None None 2020-03-02 08:01:53 UTC
Red Hat Product Errata RHBA-2020:0648 None None None 2020-03-02 08:08:17 UTC
Red Hat Product Errata RHBA-2020:0650 None None None 2020-03-02 10:20:37 UTC
Red Hat Product Errata RHSA-2020:0573 None None None 2020-02-24 12:53:42 UTC
Red Hat Product Errata RHSA-2020:0579 None None None 2020-02-25 08:36:26 UTC
Red Hat Product Errata RHSA-2020:0597 None None None 2020-02-25 13:04:37 UTC
Red Hat Product Errata RHSA-2020:0602 None None None 2020-02-25 15:53:17 UTC
Red Hat Product Errata RHSA-2020:2625 None None None 2020-06-19 03:44:27 UTC

Description Pedro Sampaio 2020-01-06 22:20:40 UTC
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 overwrite files that already exist on disk.

References:

https://www.npmjs.com/advisories/1434
https://nodejs.org/en/blog/vulnerability/december-2019-security-releases/
https://blog.npmjs.org/post/189618601100/binary-planting-with-the-npm-cli

Comment 1 Pedro Sampaio 2020-01-06 22:21:31 UTC
Created nodejs tracking bugs for this issue:

Affects: epel-all [bug 1788311]
Affects: fedora-all [bug 1788312]

Comment 2 Jason Shepherd 2020-01-08 04:34:18 UTC
Red Hat Quay versions up to v3.2.0 are affected by the use of yarn to install client side dependencies. Red Hat Quay uses the npm package from RHEL 7 so that will be updated once a fix for RHEL 7 is available.

Comment 3 Jason Shepherd 2020-01-09 00:04:45 UTC
The issue in Yarn was assigned CVE-2019-10773, Red Hat Quay is affected by that issue, not this one.

Comment 4 Ted (Jong Seok) Won 2020-01-17 01:03:00 UTC
This vulnerability is out of security support scope for the following products:
 * Red Hat Openshift Application Runtimes Node.js 8

Please refer to https://access.redhat.com/support/policy/updates/jboss_notes for more details.

Comment 10 Cedric Buissart 2020-02-21 11:43:28 UTC
This vulnerability was fixed in RHEL-8.1.0.z via the following erratum : https://access.redhat.com/errata/RHEA-2020:0330

Comment 11 errata-xmlrpc 2020-02-24 12:53:35 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.0 Update Services for SAP Solutions

Via RHSA-2020:0573 https://access.redhat.com/errata/RHSA-2020:0573

Comment 12 Product Security DevOps Team 2020-02-24 15:49:41 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2019-16776

Comment 13 errata-xmlrpc 2020-02-25 08:36:24 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2020:0579 https://access.redhat.com/errata/RHSA-2020:0579

Comment 14 errata-xmlrpc 2020-02-25 13:04:35 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS

Via RHSA-2020:0597 https://access.redhat.com/errata/RHSA-2020:0597

Comment 15 errata-xmlrpc 2020-02-25 15:53:15 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS

Via RHSA-2020:0602 https://access.redhat.com/errata/RHSA-2020:0602

Comment 21 errata-xmlrpc 2020-06-19 03:44:24 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS

Via RHSA-2020:2625 https://access.redhat.com/errata/RHSA-2020:2625


Note You need to log in before you can comment on or make changes to this bug.