Project

General

Profile

Actions

Bug #24030

closed

Directory traversal attack in em_unzip

Added by Anthon Pang about 14 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2010-11-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

typo3/mod/tools/em/class.em_unzip.php is a fork of an old version of PclZip. The latest version of PclZip is 2.8.2 and has a number of fixes (eg 64-bit support) and security enhancements.

em_unzip.php handles absolute paths in the .zip archive but not relative paths containing '../' thus allowing files to be extracted outside of the target directory. To prevent this, PclZip 2.5 introduced PCLZIP_OPT_EXTRACT_DIR_RESTRICTION to set a basedir. Note: there's a bug where it can be bypassed if the extracted basedir is supplied as an absolute path. (See attached patch against PclZip 2.8.2 for a fix.)

Reporter: Anthon Pang
OTRS: 2010111210000026
(issue imported from #M16362)


Files

16362_trunk.patch (574 Bytes) 16362_trunk.patch Administrator Admin, 2010-12-09 21:16
16362_44.patch (451 Bytes) 16362_44.patch Administrator Admin, 2010-12-09 21:17
16362_43.patch (451 Bytes) 16362_43.patch Administrator Admin, 2010-12-09 21:17
16362_42.patch (451 Bytes) 16362_42.patch Administrator Admin, 2010-12-09 21:17
Actions

Also available in: Atom PDF