Bug 1260716 - (CVE-2014-9767) CVE-2014-9767 php: ZipArchive::extractTo allows for directory traversal when creating directories
CVE-2014-9767 php: ZipArchive::extractTo allows for directory traversal when ...
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
impact=moderate,public=20150825,repor...
: Security
Depends On: 1260758 1260759
Blocks: 1260756
  Show dependency treegraph
 
Reported: 2015-09-07 09:53 EDT by Adam Mariš
Modified: 2016-11-15 08:15 EST (History)
15 users (show)

See Also:
Fixed In Version: php 5.4.45, php 5.5.29, php 5.6.13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-12 17:42:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Adam Mariš 2015-09-07 09:53:31 EDT
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 12:12:14 EDT
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 14:55:44 EDT
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 17:51:24 EDT
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 19:19:53 EDT
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 05:00:54 EDT
CVE assignment:

http://seclists.org/oss-sec/2016/q1/671
Comment 7 errata-xmlrpc 2016-11-15 06:47:02 EST
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.