Bug 1702338 (CVE-2018-20834) - CVE-2018-20834 nodejs-tar: Arbitrary file overwrites when extracting tarballs containing a hard-link
Summary: CVE-2018-20834 nodejs-tar: Arbitrary file overwrites when extracting tarballs...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2018-20834
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1702339 1702340 1710734 1710735
Blocks: 1702341
TreeView+ depends on / blocked
 
Reported: 2019-04-23 14:19 UTC by Laura Pardo
Modified: 2023-05-23 10:51 UTC (History)
32 users (show)

Fixed In Version: nodejs-tar 4.4.2
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in nodejs-tar in versions prior to 4.4.2. An arbitrary file overwrite can occur when extracting tarballs containing a hard-link to a file that already exists in the system. Further, a file that matches the hard-link may overwrite the system's files with the contents of the extracted file. The highest threat from the vulnerability is to data confidentiality and integrity as well as system availability.
Clone Of:
Environment:
Last Closed: 2019-07-22 15:07:09 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:1844 0 None None None 2019-07-24 14:56:07 UTC
Red Hat Product Errata RHBA-2019:1869 0 None None None 2019-07-26 18:08:51 UTC
Red Hat Product Errata RHSA-2019:1821 0 None None None 2019-07-22 13:37:59 UTC

Description Laura Pardo 2019-04-23 14:19:06 UTC
A vulnerability was found in nodejs-tar before version 4.4.2. An Arbitrary File Overwrite when extracting tarballs containing a hard-link to a file that already exists in the system, and a file that matches the hard-link may overwrite system's files with the contents of the extracted file.


References:
https://hackerone.com/reports/344595

Upstream Patch:
https://github.com/npm/node-tar/commit/b0c58433c22f5e7fe8b1c76373f27e3f81dcd4c8

Comment 1 Laura Pardo 2019-04-23 14:19:32 UTC
Created nodejs-tar tracking bugs for this issue:

Affects: epel-all [bug 1702339]
Affects: fedora-all [bug 1702340]

Comment 2 Riccardo Schirone 2019-04-30 15:12:48 UTC
Raised the CVSS score to CIA:HHH as the specially crafted tar file could overwrite files that would allow an attacker to execute code on the victim's machine as his user.

Comment 9 Riccardo Schirone 2019-05-16 07:56:10 UTC
Red Hat Software Collection Node.js 10 (rh-nodejs10-nodejs) is not affected by this flaw because it already contains the patched code.

Comment 12 errata-xmlrpc 2019-07-22 13:37:57 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.4 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS

Via RHSA-2019:1821 https://access.redhat.com/errata/RHSA-2019:1821

Comment 13 Product Security DevOps Team 2019-07-22 15:07:09 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-2018-20834

Comment 14 Eric Christensen 2020-04-29 15:06:56 UTC
External References:

https://hackerone.com/reports/344595


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