Issue Bug Closed

#24030Directory traversal attack in em_unzip

Anthon Pang 11/12/10, 02:24 updated 10/02/18, 12:23

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)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.