Bug 1584400 (CVE-2018-1002204) - CVE-2018-1002204 nodejs-adm-zip: arbitrary file write vulnerability / arbitrary code execution using a specially crafted zip file
Summary: CVE-2018-1002204 nodejs-adm-zip: arbitrary file write vulnerability / arbitra...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2018-1002204
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1584402
TreeView+ depends on / blocked
 
Reported: 2018-05-30 19:45 UTC by Laura Pardo
Modified: 2021-10-21 20:04 UTC (History)
12 users (show)

Fixed In Version: nodejs-adm-zip 0.4.9
Clone Of:
Environment:
Last Closed: 2021-10-21 20:04:52 UTC
Embargoed:


Attachments (Terms of Use)

Description Laura Pardo 2018-05-30 19:45:50 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/cthackers/adm-zip/pull/212
https://github.com/cthackers/adm-zip/commit/6f4dfeb9a2166e93207443879988f97d88a37cde

https://github.com/cthackers/adm-zip/pull/215
https://github.com/cthackers/adm-zip/commit/ce59e5a05a0dc1e31ca2f4ae43ae8d50a2f0920a

https://github.com/cthackers/adm-zip/issues/176
https://github.com/cthackers/adm-zip/commit/3f00a03ff55a1e1643b690a67fbe164e9ed7f48a

Comment 5 Tomas Hoger 2018-06-01 09:43:21 UTC
Public now via:

https://snyk.io/vuln/npm:adm-zip:20180415

Comment 6 Jason Shepherd 2021-03-31 20:48:25 UTC
Statement:

While Red Hat Mobile Application Platform (RHMAP) does include the vulnerable library, it does not use the vulnerable methods extract* fixed in the library, [1]. RHMAP upgrade the vulnerable library in a future version.

Red Hat Quay includes adm-zip as a dependency of protractor which is only used at build time. The vulnerable library is not used at runtime meaning this has a low impact on Red Hat Quay.

[1] https://github.com/cthackers/adm-zip/commit/6f4dfeb9a2166e93207443879988f97d88a37cde


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