Bug 1260716 (CVE-2014-9767) - CVE-2014-9767 php: ZipArchive::extractTo allows for directory traversal when creating directories
Summary: CVE-2014-9767 php: ZipArchive::extractTo allows for directory traversal when ...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2014-9767
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: 1260758 1260759
Blocks: 1260756
TreeView+ depends on / blocked
 
Reported: 2015-09-07 13:53 UTC by Adam Mariš
Modified: 2019-09-29 13:36 UTC (History)
15 users (show)

Fixed In Version: php 5.4.45, php 5.5.29, php 5.6.13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-12 21:42:06 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2750 0 normal SHIPPED_LIVE Moderate: rh-php56 security, bug fix, and enhancement update 2016-11-15 16:40:02 UTC

Description Adam Mariš 2015-09-07 13:53:31 UTC
Inside php_zip.c there's a function called php_zip_make_relative_path which is used to sanitize the file path when extracting a file/directory from a ZIP. When extracting a file, the sanitized pathname is used, so files are only created inside of the directory where they're being extracted. However, for directories, the unsanitized/user-provided "file" value is used instead of the sanitized "path_cleaned" value. As a result, a directory can be created outside of the directory where a ZIP file is being extracted.

Upstream report:

https://bugs.php.net/bug.php?id=70350

Upstream patch:

http://git.php.net/?p=php-src.git;a=commit;h=f9c2bf73adb2ede0a486b0db466c264f2b27e0bb

Comment 1 Adam Mariš 2015-09-07 16:12:14 UTC
Created php-pecl-zip tracking bugs for this issue:

Affects: fedora-all [bug 1260758]
Affects: epel-5 [bug 1260759]

Comment 2 Fedora Update System 2015-09-19 18:55:44 UTC
php-pecl-zip-1.13.1-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 3 Fedora Update System 2015-09-19 21:51:24 UTC
php-pecl-zip-1.12.5-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 4 Fedora Update System 2015-09-19 23:19:53 UTC
php-pecl-zip-1.12.5-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.

Comment 6 Andrej Nemec 2016-03-17 09:00:54 UTC
CVE assignment:

http://seclists.org/oss-sec/2016/q1/671

Comment 7 errata-xmlrpc 2016-11-15 11:47:02 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.2 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS

Via RHSA-2016:2750 https://rhn.redhat.com/errata/RHSA-2016-2750.html


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