Files extracted from archive may be placed outside of destination directory
| Sec Bug #70019 | Files extracted from archive may be placed outside of destination directory | ||||
|---|---|---|---|---|---|
| Submitted: | 2015-07-08 09:33 UTC | Modified: | 2015-09-09 10:01 UTC | ||
| From: | stewie at mail dot ru | Assigned: | stas (profile) | ||
| Status: | Closed | Package: | PHAR related | ||
| PHP Version: | 5.6.10 | OS: | Windows 7 64bit, OSX 10.10 | ||
| Private report: | No | CVE-ID: | 2015-6833 | ||
[2015-07-08 09:33 UTC] stewie at mail dot ru
Description: ------------ By modifying filenames in archive to contain paths like "../somefile.ext", after extracting they may be placed in directories outer to destination directory Test archive is at https://www.dropbox.com/s/yfk10bdmrwlj47l/TestFile.zip?dl=0 Test script: --------------- <?php $phar = new PharData('TestFile.zip'); $phar->extractTo('c:\php\test\test'); ?> Expected result: ---------------- file placed under c:\php\test\test Actual result: -------------- file placed under c:\php\test
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2015-07-08 14:30 UTC] ab@php.net
-Status: Open +Status: Not a bug
[2015-07-17 15:13 UTC] ab@php.net
-Status: Not a bug +Status: Analyzed
[2015-07-17 15:13 UTC] ab@php.net
[2015-08-02 12:59 UTC] ab@php.net
[2015-08-02 13:02 UTC] ab@php.net
[2015-08-02 17:26 UTC] stas@php.net
[2015-08-02 20:19 UTC] ab@php.net
[2015-08-02 20:52 UTC] stas@php.net
[2015-08-02 22:26 UTC] ab@php.net
[2015-08-02 23:32 UTC] stas@php.net
[2015-08-03 10:36 UTC] ab@php.net
[2015-08-04 22:22 UTC] stas@php.net
-Status: Analyzed +Status: Closed
[2015-09-09 10:01 UTC] kaplan@php.net
-Assigned To: +Assigned To: stas -CVE-ID: +CVE-ID: 2015-6833
[2016-03-23 13:08 UTC] mustafa at yavuzm dot com