Bug 1584392 (CVE-2018-1002200)

Summary: CVE-2018-1002200 plexus-archiver: arbitrary file write vulnerability / arbitrary code execution using a specially crafted zip file
Product: [Other] Security Response Reporter: Laura Pardo <lpardo>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: apevec, chazlett, chrisw, dbhole, hhorak, jaromir.capik, java-maint, java-sig-commits, jjoyce, jorton, jschluet, kbasil, lhh, lpeer, markmc, mburns, mizdebsk, mkolesni, rbryant, sclewis, security-response-team, slinaber, tdecacqu
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: plexus-archiver 3.6.0 Doc Type: If docs needed, set a value
Doc Text:
A path traversal vulnerability has been discovered in plexus-archiver when extracting a carefully crafted zip file which holds path traversal file names. A remote attacker could use this vulnerability to write files outside the target directory and overwrite existing files with malicious code or vulnerable configurations.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-10 10:27:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1585546, 1585631, 1585632, 1585633, 1585634, 1585635, 1585636, 1587816, 1587817, 1587818    
Bug Blocks: 1584393    

Description Laura Pardo 2018-05-30 19:27:01 UTC
A vulnerability has been found in the way developers have implemented the archive extraction of files. An arbitrary file write vulnerability, that can be achieved using a specially crafted zip archive (affects other archives as well, bzip2, tar,xz, war, cpio, 7z), that holds path traversal filenames. So when the filename gets concatenated to the target extraction directory, the final path ends up outside of the target folder. Of course if an executable or a configuration file is overwritten with a file containing malicious code, the problem can turn into an arbitrary code execution issue quite easily. This affects multiple libraries that lacks of a high level APIs that provide the archive extraction functionality. 


References:
https://github.com/codehaus-plexus/plexus-archiver/pull/87

Patch:
https://github.com/codehaus-plexus/plexus-archiver/commit/58bc24e465c0842981692adbf6d75680298989de

Comment 1 Tomas Hoger 2018-05-31 07:02:10 UTC
The above fix was included in upstream version 3.6.0.

Comment 3 Doran Moppert 2018-06-04 03:38:44 UTC
Acknowledgments:

Name: Danny Grander (Snyk)

Comment 7 Doran Moppert 2018-06-05 07:33:39 UTC
Public via:

https://snyk.io/vuln/SNYK-JAVA-ORGCODEHAUSPLEXUS-31680

Comment 8 Riccardo Schirone 2018-06-05 15:25:04 UTC
External References:

https://snyk.io/research/zip-slip-vulnerability

Comment 10 Andrej Nemec 2018-06-06 07:21:20 UTC
Created plexus-archiver tracking bugs for this issue:

Affects: fedora-27 [bug 1587818]
Affects: fedora-28 [bug 1587817]

Comment 12 errata-xmlrpc 2018-06-12 14:47:03 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2018:1836 https://access.redhat.com/errata/RHSA-2018:1836

Comment 13 errata-xmlrpc 2018-06-12 15:08:48 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS

Via RHSA-2018:1837 https://access.redhat.com/errata/RHSA-2018:1837

Comment 15 Jonathan Christison 2019-09-23 11:08:57 UTC
Marking Fuse 7 not affected, used at build time but crucially the vulnerable methods to zipslip are not used